Top Command
Shortcuts :
- 1 to see CPU cores
- Shift+M to see RAM usage sorted process
- Shift+F to select the sorting order your self
by pressing :
- 1 you will see no of cpu cores and their status
- %CPU0 :
- us – cpu used by user process
- sy – system process
- ni – show the process which has been given priority
- id – idle time of CPU
- wa – waiting for IO operation
- hi – hardware interrupt like ctrl+C to stop a process which is utilizing cpu process
- si – system interrupts
- st – (steal time)amount of time consumed by your virtual machines hypervisor
- M (in caps) you will sort by memory the top table
- m – you will shot the memory is progress bar
- P – (in caps) sort by cpu utilization
- u – (type the user name) – to see the processes of that perticular user
- c – command line argument of that process
- z – it will become colorfull
In the table of top
- PR – means priority
- NI – Nice value(Priority that is set to that process)
- VIR – Virtual Memory
- RES – reserved memory (This cannot be swapped for other process)
- SHR – Shared resources of that process
- S – Status (R – Running in CPU, S – Sleeping
cat /proc/loadavg //when cpu utilization is high since top is heavy (w command also works)
0.41 0.65 0.65 4/813 5416
how to check loadavg?
1st section 1 min load avg
2nd section 5 min load avg
3rd section 15 min load avg
if load avg is like
20 10 5
This means your load avg is increasing and you need to worry
if load avg is like
5 19 15
This means your load avg is decreasing and you need not worry