1. top -hv|-bcHiOSs -d secs -n max -u|U user -p pid -o fld -w [cols]
When Started top for the first time. You’ll be presented with three area’s as below.
top - 08:07:39 up 21 days, 4:49, 1 user, load average: 0.05, 0.03, 0.00 ------>summary area
Tasks: 63 total, 1 running, 62 sleeping, 0 stopped, 0 zombie |
Cpu(s): 0.1%us, 0.0%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st |
Mem: 2097152k total, 1153680k used, 943472k free, 0k buffers |------> Firlds/columns
Swap: 0k total, 0k used, 0k free, 760904k cached |
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ | COMMAND
847 thomas12 38 18 111m 30m 1556 S 1.3 1.5 0:00.04 cpanellogd-ht |
813 root 20 0 99.2m 4604 3360 S 1.0 0.2 0:00.09 sshd |-------task area
804 root 20 0 99.2m 4600 3360 S 0.7 0.2 0:00.09 sshd |
ROW1:
01:56:28 – System time
up 3:36 – Server uptime 3Hours and 36 Minutes
Load average 0.05 (Every 1 min average) 0.06 (Every 5 Minutes average) 0.07 (Every 15 Minutes Average)
Row2:
2 row will provides you details about tasks and there status. It simple and straight forward that total processes, Running processes, Sleeping Processes, Stopped Processes and Zombie Process.
Zombie Processes are the processes which are died and still in process queue.
Row3:
0.0 us – User running process percentage of CPU
0.0 sy – System running process CPU percentage
User Running (us) + System Running (sy) = Total CPU Used
ni, nice : time running niced user processes
id, idle : time spent in the kernel idle handler
wa, IO-wait : time waiting for I/O completion
hi : time spent servicing hardware interrupts
si : time spent servicing software interrupts
st : time stolen from this vm by the hypervisor
Row4:
memory and swap utilization
4 Row provides Memory (RAM) and Swap Utilization. “Buffers” represent how much portion of RAM is dedicated to cache disk block. “Cached” is similar like “Buffers”, only this time it caches pages from file reading.
R0w5:
Process Identify (PID) Every command/script/task you run an command/GUI will be assigned with UNIQ process ID with round robin mechanism.
USER – Which user run the command/script
PR – Priority of the task execution value 0 is an high priority and value 40 is low.
NI – Nice Value -20 is an high value and 20 is an low value
VIRT – Virtual Memory Size (KiB). The total amount of virtual memory used by the task.
RES – Resident Memory Size (KiB). The non-swapped physical memory a task is using.
SHR – Shared Memory Size (KiB). Amount of shared memory available to a task, not all of which is typically resident.
S — Process Status
D = uninterruptible sleep
R = running
S = sleeping
T = stopped by job control signal
t = stopped by debugger during trace
Z = zombie
%CPU – CPU Usage
%MEM – Memory allocate to the task to perform
TIME – Time elapsed for particular task execution
COMMAND – executed command name / path