Flashcards in CPU Deck (17):
Describe the top utility.
A combination of free, uptime and ps command.
What do the three numbers in the uptime output correlate to?
The CPU load average over the last minute, 5 minutes and 15 minutes respectively.
What determines the 100% load of a CPU?
The number of processor cores.
Ex: A quad-core processor has a 100% CPU load of 4.00
What's the file you can check to determine the number of processor cores your system has?
grep 'model name' /proc/cpuinfo | wc -l
CPU percentages vs CPU load averages
CPU percentages give us a good idea of how much each process made use of the CPU but load average provide an idea of the DEMAND for the CPU.
What is the quantum value?
It determines how often the kernel takes control of the system back from a running process/application.
How to kill a process from top?
Press 'k' key. Then type the PID of the process you want to kill.
First 5 lines in top:
CPU metric: us
Percentage of CPU time spent running user processes
CPU metric: sy
Percentage of CPU time spent running the kernel and kernel processes
CPU metric: ni
Percentage of CPU times spent running niced user processes. Nicing a process changes its priority.
CPU metric: id
Percentage of CPU time spent idle.
CPU metric: wa
Percentage of CPU time spent on I/O. If this value is low on a sluggish system, it is probably safe to rule out network or disk I/O as the cause.
CPU metric: hi
Percentage of CPU times spent servicing hardware interrupts. Used by devices to let the system know they require attention.
Ex: hard disk signaling it has read data blocks
CPU metric: si
Percentage of CPU times spent servicing software interrupts. Occurs when a software terminates or is requesting some service.
CPU metric: st
Percentage of CPU times spent