- View process
- Top
- The top command displays in real time the resource usage of each process in the system
- Command display:
Top-20:48:18 up 525 days, 4:51, 8 users, load average:2.81, 2.21, 1.78tasks:443 Total, 1 running, 438 sleeping, 4 stopped, 0 zombiecpu (s): 4.8%us, 3.2%sy, 0.0%ni, 90.8%id, 1.0%wa, 0.0%hi, 0.2%si, 0.0%stmem:16282936k Total, 15914472k used, 368464k free, 563708k buffersswap:8388604k total, 3620012k used, 4768592k free, 2454388k cached PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND43032 root 0 1274m 98m 4020 S 3.0 0.6 892: 03.94 node 3213 esuser 0 12.7g 2.5g 7396 s 0.7 16.4 911:21.10 Java 3400 root 0 406m 7444 3880 s 0.7 0.0 4043:09 memcacheq12314 Root 0 134m 1088 684 S 0.7 0.0 1230:02 redis-server25771 root 20 0 221 6m 182m 161m S 0.7 1.1 1933:57 mongod35730 Jenna 0 15296 1548 944 R 0.7 0.0 0:01.25 top 1911 root 2 0 0 170m 18m 480 s 0.3 0.1 398:43.28 redis-server 3398 root 0 407m 16m 11m s 0.3 0.1 4608:05 MEMCA Cheq 3402 Root 20 0 401m 1388 1112 S 0.3 0.0 372:14.78 Memcacheq
Description
- Statistical information Area
- The first line: task queue information, with the execution results of the uptime command, the parameters are described as follows:
- 20:54:06: Current system time
- Up 525 Day, 4:57: The system has been running for 525 days, 4 hours, 57 minutes.
- 8 Users: Currently logged in user has 8
- Load average:2.68, 2.05, 1.81: Three numbers are 1min,5min,15min, divided by the number of logical CPUs, if >5, indicates that the system is overloaded
[[email protected] ~]$ uptime 20:54:06 up 525 days, 4:57, 8 users, load average:2.68, 2.05, 1.81
- Second line: tasks--task (process), the parameters are as follows
- tasks:443 total,443 A mission
- 1 running, one running
- 438 sleeping,438 in hibernation
- 4 stopped,4 states for stoped
- 0 Zombie, 0 zombie processes
- The third line, CPU status information, the parameters are as follows: Percentage of CPU per process station
- 4.8%us, User space
- 3.2%sy, kernel space
- 0.0%ni, changing the priority process
- 90.8%id, Idle CPU
- 1.0%wa,io wait
- 0.0%hi, Hard interrupt
- 0.2%si, soft terminal
- Row four, memory state
- mem:16282936k Total,
- 15914472k used,
- 368464k free,
- 563708k buffers
- Line five, swap swap partition information
- swap:8388604k Total,
- 3620012k used, in top we have to monitor the fifth line swap partition used, if this value is constantly changing, the kernel is constantly in memory and swap data exchange, which is really not enough memory.
- 4768592k free,
- 2454388k Cached
- Process tasks, project information
- PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND
pid-Process ID
user-Process Owner
pr-Process Priority
The Ni-nice value. Negative values indicate high priority, positive values indicate low priority
The total amount of virtual memory used by the virt-process, in kilobytes. Virt=swap+res
The size, in kilobytes, of the physical memory used by the res-process and not swapped out. Res=code+data
shr-shared memory size, in kilobytes
S-process state. d= non-disruptive sleep status r= run s= sleep t= track/stop z= zombie Process
%cpu-percentage of CPU time that was last updated to current
Percentage of physical memory used by the%mem-process
Total CPU time used by the time+-process, Unit 1/100 sec
command-Process Name (command name/command line
- Ps
- View Memory
- Free
- View IO
- Iostat
- View Disk
- Df
Linux View Status command