1 Monitoring IO Performance
Nload-x
The%util key number is too large to indicate poor IO performance, which may be disk aging, or the disk itself fails.
The Iotop command is also dynamically displayed, similar to top, to see how fast the disk reads and writes
View Memory usage
2 free-h
View memory conditions
Here's a relationship:
Toal=used+free+buff/cache
Avavilable=free+ the remaining Buff/cache
So look at the rest of the memory, available-based, you can assume that both free and used are defined by physical memory
3 PS Viewing process
ps aux |grep mysql
Filter out a process
A displays all programs under the current terminal, including other users ' programs
U display program status in user-oriented format
X Show All programs, not the terminal to distinguish
Filter out a process
Usage: PS aux or ps-elf
STAT Section Description
D a process that cannot be interrupted
The process of R run state
The process of the S sleep state
T paused process
Z Zombie Process
< high-priority processes
N Low-priority processes
Memory paging is locked in memory
S master Process
L Multithreading Process
+ Foreground Process
4 netstat
Monitoring network status, listening port
netstat -lnp
-l lists only the service states that are in Listen (listening)
-N refuses to display aliases, showing all numbers converted to numbers
-P Displays the program name that establishes the associated link
NETSTAT-LNP |grep + port number or service name
You can see if a service is started, or you can view the process with PS
netstat -ltnp
View Only TCP
netstat -lunp
View Only UDP
Netstat-an List all port states
If the server you are administering is a server that provides Web services (80 ports), you can use Netstat-an |grep 80 to see what IP is currently connected to the Web service
Little Tricks
netstat -an |awk ‘/^tcp/ {++sta[$NF]} END {for(key in sta) print key,"\t",sta[key]}‘
Count the listening state and the number of connection states at the beginning of the TCP
5 Tcpdump Grab Bag tool
Tcpdump-nn-i + NIC Name
Let's focus on the third and fourth columns, which one ip+port is connecting which ip+port
Linux Learning Summary (23) System Management Tips 2