Wednesday, September 16, 2015

Top command


Field / Coloums

PID
The Process ID, to uniquely identify a processes.

USER
The effective user name of the owner of the processes.

PR
The scheduling priority of the process. Some values in this field are 'rt'. It means that the process is running under real-time.

NI
The nice value of the process. Lower values mean higher priority.

VIRT
The amount of virtual memory used by the process.

RES
The resident memory size. Resident memory is the amount of non-swapped physical memory a task is using.

SHR
SHR is the shared memory used by the process.

S
This is the process status. It can have one of the following values:

D - uninterruptible sleep
R - running
S - sleeping
T - traced or stopped
Z - zombie

%CPU
It is the percentage of CPU time the task has used since last update.

%MEM
Percentage of available physical memory used by the process.

TIME+
The total CPU time the task has used since it started, with precision upto hundredth of a second.

COMMAND
The command which was used to start the process.

There are many other outputs which are not displayed by default which can display information about page faults, effective group and group ID of the process, and many more.

Uptime and Load Averages:

 



At the top of top command is displayed the output similar to uptime command.
The fields display: * current time
* the time your system is been up
* number of users logged in
* load average of 5, 10 and 15 minutes respectively.

This uptime display can be toggled with 'l' command.


Task Usage:

 

 
          The processes can be in different states. It shows total number of the processes. Out of these, the processes can be running, sleeping, stopped or in zombie (zombie is the state of a process state, These process summary can be toggled with 't' command.


CPU States:


 


* us, user: CPU time in running (un-niced) user processes
* sy, system: CPU time in running kernel processes
* ni, niced: CPU time in running niced user processes
* wa, IO wait: CPU time waiting for IO completion
* hi: CPU time serving hardware interrupts
* si: CPU time serving software interrupts
* st: CPU time stolen for this vm by the hipervisor.

This can be toggled with 't' command.

Memory Usage:

 


1st of these lines is for physical memory and the second for virtual memory (swap space).
 The physical memory is displayed as: total available memory, used memory, free memory, and memory used for buffers
Similarly, swap reflects: total, used, free and cached swap space.
The memory can be toggled with 'm' command.



 

No comments:

Post a Comment