View the system resource usage command under Linux

  
one, top command
1. Function
The top command is used to display the program process in execution, the usage rights are all users.
2. Format
top [-] [d delay] [q] [c] [S] [s] [i] [n]
3. Main parameters
d: specify updated Interval, in seconds.
q: There are no delayed updates. If the user has a superuser, the top command will be executed with the highest priority.
c: Show the complete path and name of the process.
S: Accumulation mode, which accumulates the CPU time of the sub-strokes that have been completed or disappeared.
s: Safe mode.
i: Does not show any Idle or Zombie itinerary.
n: The number of updates is displayed. When finished, it will exit top.
Figure 1 Display of top command
In Figure 1, the first line shows the current time, system startup time, current system login users, and average load. The second line shows all the processes that are started, currently running, Sleeping, and useless (Zombie). The third line shows the current CPU usage, including the proportion of system occupancy, the proportion of users used, and the ratio of idle (Idle). The fourth line shows the usage of physical memory, including the total available memory, used memory, free memory, and memory occupied by the buffer. The fifth line shows the swap partition usage, including the total swap partition, used, free, and size for the cache. The sixth line shows the most items, and a detailed explanation is listed below.
PID (Process ID): Process identification number.
USER: The username of the process owner.
PR: The priority level of the process.
NI: The priority value of the process.
VIRT: The virtual memory value occupied by the process.
RES: The physical memory value occupied by the process.
SHR: The shared memory value used by the process.
S: The state of the process, where S means sleep, R means running, Z means zombie state, and N means the process priority value is negative.
%CPU: CPU usage occupied by this process.
%MEM: The percentage of physical memory and total memory occupied by the process.
TIME+: The total CPU time taken after the process started.
Command: The name of the startup command started by the process. If this line is not displayed, the process will have a complete command line.
Copyright © Windows knowledge All Rights Reserved