1:w View the overall system load, unable to view the specific load, such as memory, disk
23:25:20 up min, 2 users, load average:0.00, 0.01, 0.01
USER TTY from [email protected] IDLE jcpu PCPU
Flex tty1-23:13 12:08 0.01s 0.01s-bash
Flex pts/0 192.168.75.1 23:13 0.00s 0.02s 0.00s tmuxThe
first line shows the time, system uptime, number of logged-on users, CPU load: 1-minute average load, 5-minute average load, 15-minute average load
load values are normal as long as the number of CPUs is not exceeded
2:cat/etc/cpuinfo can view cup information
# cat/proc/cpuinfo |grep ' processor ' CPU number
# grep-c ' physical ID '/proc/cpuinfo number of physical CPUs
3:vmstat can monitor the status of the system
# vmstat 1 5 1 second interval output 5 times
# vmstat 1 1-second interval output
procs-----------Memory-------------Swap-------io------System-------CPU-----
r b swpd free buff cache si so bi bo in CS us sy ID WA St
1 0 0 1643624 20552 105072 0 0 1 0 0 1 0
procs: Displaying process-related information
R indicates the number of processes running and waiting for CPU time slices, greater than the number of CPUs, indicating that the CPU is not enough
B Indicates the number of processes waiting for resources, IO memory, etc., longer than 1, there will be problems
Memory: RAM information
SWPD indicates the amount of memory switched to the memory partition
Free Memory
the buffer size at which the buff will be written to disk
cache size that is read from disk by the cache
swap: Swapping of memory
The amount of data written to memory in the SI swap areaSo
memory writes the amount of data in the swap area
IO: Show disk usage
data volume of BI read disk
The amount of data that Bo writes to disk
System: Displays the number of interrupts sent during the acquisition intervalThe
number of interrupts per second observed in a time interval
the number of context switches generated by CS per second
CPU: Displays CPU usage status
% CPU time spent by US
The SY system spends more time on the CPU than
the ID Cup is in an idle state longer than
wa io Waits more time to occupy than
St steals more CPU time than usual 0
4 Top: Dynamic monitoring system of resources occupied by the process, 3 second transformation once into the shift+m by memory sort by 1 can show each CPU running state
#top-bn1 Once printed out, often in the shell
top-00:47:01 up 1:34, 2 users, Load average:0.00, 0.00, 0.00
tasks:152 Total, 1 running, 151 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.1%us, 0.1%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si , 0.0%st
mem:1906900k Total, 268400k used, 1638500k free, 22432k buffers
swap:2031612k Total, 0k used, 2031612k free, 107984k cached
PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND
Root 0 0 0 0 S 0.3 0.0 0:04.23 EVENTS/2
1478 root 0 173m 8008 4504 S 0.3 0.4 0:08.93 VMTOOLSD
Load average indicates system load
Tasks indicates the number of processes
Process list: main focus on RES: often memory size%CPU using CPU%men memory consumption
5 SAR command can monitor all resources of the system, and can print historical information
View network card traffic
#sar-N DEV
#sar-N DEV 1 5 View real-time data volume 1 seconds once
#sar-n DEV 1 View real-time data volume unlimited refresh
#sar-N dev-f/var/log/sa/sa30 View historical data traffic /var/log/sa/stored log files
12:00:01 AM IFACE rxpck/s txpck/s rxkb/s txkb/s rxcmp/s txcmp/s rxmcst/s
12:10:01 AM Lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
12:10:01 AM eth0 0.62 0.04 0.04 0.01 0.00 0.00 0.00
12:10:01 AM eth1 0.59 0.01 0.04 0.00 0.00 0.00 0.00
RXPCK/S indicates the number of packets received per second
txpck/s Indicates the number of packets per second
rxkb/s amount of data received per second
txkb/s amount of data sent per second
5 free View memory conditionTotal
used free shared buffers cached
mem:1906900 274296 1632604 232 24268 111232
-/+ buffers/cache:138796 1768104
swap:2031612 0 2031612
6 PS Viewing system processes
#ps aux |grep ' tmux '
can display process status
USER PID%cpu%MEM VSZ RSS TTY STAT START time COMMAND
Flex 2850 0.0 0.0 23712 1116 pts/0 s+ May29 0:00 tmux
Flex 2852 0.0 0.1 26528 2068? Ss May29 0:05 Tmux
Flex 4502 0.0 0.0 103308 852 pts/1 s+ 01:20 0:00 grep tmux
PID: Process ID kill-9 pid can kill process
STAT: Indicates the status of the process
D: Represents a process that cannot be interrupted, typically an IO
R: Represents a running process
S: Indicates that the process is already terminal, mostly the process is this state
T: Represents a paused process
S: Represents the main process
+: Represents a process running in the foreground
7 #netstat The-LNP print system started those ports.
#netstat-an Print network connection status
8 # tcpdump-nn-i eth1
Grab Kit Tool-I back-up network card
9 Wireshark Grab Bag tool
# Yum Install Wireshark installation
Linux Learning Essays-common commands for system daily management