Use under linux top command

top command is commonly used under Linux performance analysis tools, it can display real-time system resource usage status of each process, similar to Windows Task Manager

View Parameter Meaning

top view is divided into two parts: the operating system resource profile information and process information. First, analyze the meaning of each parameter in the resource profile, let's analyze the process of information under the meaning of each parameter.

Resources Overview
  1. Time operating system, user login, load -top
  • 10:33:25:  operating system current time
  • up xx days, HH: MM:  the operating system from running after boot time, run time how much how many points, how many days
  • users:  the current system has three user login online
  • : load average  average load 1s, 5s, 15s system
  1. Running tasks overview -Tasks
  • : total  number of the current process system
  • running:  The current number of running processes
  • sleeping  the sleep of the current number of processes
  1. CPU Overview:% Cpu (s) denotes a CPU usage percentage, calculated according to occupancy time, in s
  • us:  user space occupied percentage of CPU time, if it is polynuclear, this value represents the average percentage occupied, may be a multi-core press handover statistics and statistical average 1
  • sy:  kernel space occupied by the percentage of CPU time, if a multi-core, ibid.
  • ni  -priority processes within the user process space occupancy percentage of CPU time changed
  • id:  idle time CPU occupancy percentage
  • wa:  waiting for input and output of the percentage of CPU time
  • hi:  CPU hardware interrupt service in the percentage of CPU time
  • Si:  CPU software interrupt service in percentage of CPU time
    Note: The percentage of time occupied = the type of CPU time consuming operation / top refresh interval. top 3s refresh, user-space processes in which the use of the CPU 1.5s 3s inside, then us equal to 50% = 1.5s / 3s
  1. Memory Overview: Unit KiB
  • total:  total memory
  • free:  the remaining amount of memory
  • used:  the amount of memory use
  • buff / cache:  the amount of memory used for buffering
  1. Swap Overview: Unit KiB
    • total:  total swap
    • free:  the number of swap free
    • used:  the number of swap use

Remarks:

Available memory = free + buffer + cached

For memory monitoring, where we in the top fifth line should always monitor swap swap partition used, if this value is constantly changing, indicating ongoing core data exchange and swap memory, which is a real memory is not enough.

The total amount of memory (used) used in the fourth row refers to the number of the memory system is now controlled by the kernel,

The total amount of free memory in the fourth row (Free) is the number of cores has not been included in its scope of control.

Into the kernel memory management are not necessarily in use, also includes used in the past can now be reused in the memory, the kernel does not return these can be re-used memory to go free, so free memory will be on linux less and less, but do not worry about it.

Seventh line of the following: the status of each process (task) Monitoring

PID - the process of the above mentioned id
the USER - Process owner of
PR - Process Priority
NI - nice value. A negative value indicates a high priority, positive values indicate a low priority
VIRT - the total amount of virtual memory used by the process, unit kb. SWAP + RES = VIRT
RES - used by the process, not swapped out of physical memory size, unit kb. The DATA CODE + = the RES
the SHR - shared memory size in kB
S - process status. D = uninterruptible sleep state R = running S = sleep T = trace / stop Z = zombie process
% CPU - the last update to the current CPU time occupancy percentage
% MEM - percentage of physical memory used by the process of the
CPU used by the process - TIME + Total time the unit 1/100 sec
cOMMAND - process name (command name / command line)

Common interactive commands:
M 根据驻留内存大小进行排序
P 根据CPU使用百分比大小进行排序
m switch the display format information memory
t 切换显示进程和CPU状态信息
c 切换显示命令名称和完整命令行
E switching top of the memory display units
the bottom of the display unit is switched memory e

Guess you like

Origin www.cnblogs.com/wangshaowei/p/11427420.html