Understanding the top command in Linux

This article explains the top command and what each line means.
http://linuxaria.com/howto/understanding-the-top-command-on-linux?lang=en

Example:

top – 10:29:46 up 44 min, 4 users, load average: 0.40, 0.31, 0.44
Tasks: 220 total, 2 running, 218 sleeping, 0 stopped, 0 zombie
Cpu(s): 24.4%us, 4.9%sy, 0.0%ni, 70.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4135036k total, 3234068k used, 900968k free, 94480k buffers
Swap: 4192252k total, 0k used, 4192252k free, 825100k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2798 root 20 0 152m 71m 9340 S 17.3 1.8 6:15.56 ruby
1028 root 20 0 287m 219m 31m R 3.3 5.4 0:18.03 Xorg

What does all the numbers on the CPU line means?

The third line indicates how the cpu is used. If you sum up all the percentages the total will be 100% of the cpu. Let’s see what these values indicate in order:
Percentage of the CPU for user processes (0.3%us)
Percentage of the CPU for system processes (0.0%sy)
Percentage of the CPU processes with priority upgrade nice (0.0%ni)
Percentage of the CPU not used (99,4%id)
Percentage of the CPU processes waiting for I/O operations(0.0%wa)
Percentage of the CPU serving hardware interrupts (0.3% hi — Hardware IRQ
Percentage of the CPU serving software interrupts (0.0% si — Software Interrupts
The amount of CPU ‘stolen’ from this virtual machine by the hypervisor for other tasks (such as running another virtual machine) this will be 0 on desktop and server without Virtual machine. (0.0%st — Steal Time)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s