1. watch -n 2 -d free -m
2. free -m
3. netstat -n | grep tcp | awk '{print $5}'|grep -v '127.0.0.1' | wc -l
4. top
one. TOP Top Five Lines of Statistics The top five lines of the
statistics area are the overall system statistics.
1. The first line is the task queue information, which is
the same as the execution result of the uptime command:
[root@localhost ~]# uptime
13:22:30 up 8 min, 4 users, load average: 0.14, 0.38, 0.25
The content is as follows:
12: 38:33
current time
up 50days
system running time, the format is hour: minute
1 user
number of currently logged in users
load average: 0.06, 0.60, 0.48
system load, that is, the average length of the task queue. The three values are the average values from 1 minute, 5 minutes, and 15 minutes ago to the present.
2. The second and third lines are information about the process and CPU.
When there are multiple CPUs, these contents may exceed two lines. The content is as follows:
Tasks: 29 total total number of
processes
1 running number of running
processes
28 The number of sleeping processes
0
stopped The number of stopped
processes
0 zombies The number of zombie
processes Process occupied CPU percentage 98.7% id idle CPU percentage 0.0% wa CPU time percentage waiting for input and output 0.0% hi 0.0% si 3. The fourth and fifth rows are memory information. The content is as follows: Mem: 191272k total total physical memory 173656k used total physical memory used 17616k free memory total 22052k buffers used as kernel cache memory Swap: 192772k total total swap area 0k used total used swap area 192772k free total free swap area
123988k cached
buffered total swap area. The contents of the memory are swapped out to the swap area, and then swapped into the memory, but the used swap area has not been overwritten, and this value is the size of the swap area where these contents already exist in the memory. When the corresponding memory is swapped out again, there is no need to write to the swap area.
2. Process information
Column name
Meaning
PID
process id
PPID
parent process id
RUSER
Real user name
UID
process owner user id
USER
process owner user name
GROUP
process owner group name
TTY
Terminal name of the start process. Processes not started from the terminal are displayed as ?
PR
priority
NI
nice value. Negative values indicate high priority, positive values indicate the last CPU used by low priority
P
, which is only meaningful in a multi-CPU environment
%CPU
The percentage of CPU time used by the last update to the present
TIME
The total CPU time used by the process, in seconds
TIME+
The total CPU time used by the process, in units of 1/100 seconds
%MEM
The percentage of physical memory used by the process
The total amount of virtual memory used by the VIRT process, in kb. VIRT=SWAP+RES The size of the virtual memory used by the
SWAP
process to be swapped out, in kb. The size of the physical memory used by the
RES process but not swapped out, in kb.
RES=CODE+DATA The physical memory size occupied by the
CODE
executable code, in kb The physical memory size occupied by the part (data segment + stack) other than the
DATA executable code, in kb SHR shared memory size, in kb nFLT Page fault times nDRT The number of pages modified since the last write. S process state. D=Uninterruptible sleep state R=Run S=Sleep T=Track/Stop Z=Zombie process COMMAND command name/command line WCHAN If the process is sleeping, it will display the sleeping system function name Flags task flag, refer to sched. h
Server monitoring
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326759607&siteId=291194637
Recommended
Ranking