top -c => press i (removes idle processes) => toggle pressing 1 (shows individual processors)
The first line of numbers on the dashboard includes the time, how long your computer has been running, the number of people logged in, and what the load average has been for the past one, five, and 15 minutes. The second line shows the number of tasks and their states: running, stopped, sleeping, or zombie.
The third line displays the following central processing unit (CPU) values:
us: Amount of time the CPU spends executing processes for people in “user space.”
sy: Amount of time spent running system “kernel space” processes.
ni: Amount of time spent executing processes with a manually set nice value.
id: Amount of CPU idle time.
wa: Amount of time the CPU spends waiting for I/O to complete.
hi: Amount of time spent servicing hardware interrupts.
si: Amount of time spent servicing software interrupts.
st: Amount of time lost due to running virtual machines (“steal time”).
The fourth line shows the total amount (in kibibytes) of physical memory, and how much is free, used, and buffered or cached.
The fifth line shows the total amount (also in kibibytes) of swap memory, and how much is free, used, and available. The latter includes memory that’s expected to be recoverable from caches.
The column headings in the process list are as follows:
PID: Process ID.
USER: The owner of the process.
PR: Process priority.
NI: The nice value of the process.
VIRT: Amount of virtual memory used by the process.
RES: Amount of resident memory used by the process.
SHR: Amount of shared memory used by the process.
S: Status of the process. (See the list below for the values this field can take).
%CPU: The share of CPU time used by the process since the last update.
%MEM: The share of physical memory used.
TIME+: Total CPU time used by the task in hundredths of a second.
COMMAND: The command name or command line (name + options).
Memory values are shown in kibibytes. The COMMAND column is off-screen, to the right—it didn’t fit in the image above, but we’ll see it shortly.
The status of the process can be one of the following:
D: Uninterruptible sleep
R: Running
S: Sleeping
T: Traced (stopped)
Z: Zombie
Press Q to exit top.
# uptime
10:51:41 up 28 days, 15:10, 1 user, load average: 0.71, 1.04, 1.04
1 min 5 min 15 min
load average should not be higher than cpu cores constantly
# dmesg -T | tail
Mitä tekee: Näyttää kernelin viestilokin (dmesg) viimeiset rivit, aikaleimoilla (-T).
Mihin käytetään: Tarkistaa viimeisimmät kernel-viestit, esim. laitevirheet, I/O-ongelmat, muistivirheet.
Esimerkki: Jos levy alkaa hävitä, näet virheilmoituksia kuten I/O error on device.
# vmstat 1
Mitä tekee: Näyttää järjestelmän tilastot (CPU, muistinkäyttö, swap, I/O) sekunnin välein.
Mihin käytetään: Nopeasti näkee:
r = prosessit jonossa (CPU-kuorma)
si/so = swap in/out (muistipaine)
wa = I/O wait (levy hidastaa)
Hyöty: Jos CPU-idle on 0 ja r on korkea → CPU-pullonkaula.
# mpstat -P ALL 1
Mitä tekee: Näyttää CPU-tilastot per ydin sekunnin välein.
Mihin käytetään: Näkee, onko kuorma tasaisesti jakautunut vai yksi ydin tukossa.
Hyöty: Jos yksi ydin on 100% ja muut idle → prosessi ei skaalaudu.
# pidstat 1
Mitä tekee: Näyttää prosessikohtaiset CPU-, I/O-, ja muististatistiikat sekunnin välein.
Mihin käytetään: Selvittää, mikä prosessi syö resursseja.
Hyöty: Jos CPU on täynnä, näet heti syyllisen PID:n.
# iostat -xz 1
Mitä tekee: Näyttää levyn I/O-tilastot, laitteiden käyttöasteen ja latenssin.
Mihin käytetään: Tarkistaa, onko levy pullonkaula.
Tärkeät kentät:
%util = kuinka paljon levy on käytössä (yli 80% → ongelma)
await = keskimääräinen odotusaika (ms)
r/s, w/s = luku- ja kirjoitusoperaatiot
Hyöty: Jos await on korkea → levy hidas.
# free -m
Mitä tekee: Näyttää muistinkäytön megatavuina.
Mihin käytetään: Tarkistaa RAM-tilanne ja swap.
Hyöty: Jos available on pieni ja swap kasvaa → muistipaine.
# sar -n DEV 1
Mitä tekee: Näyttää verkkoliikenteen tilastot per verkkolaite sekunnin välein.
Mihin käytetään: Näkee, onko verkko pullonkaula.
Kentät: rxpck/s, txpck/s, rxkB/s, txkB/s.
# sar -n TCP,ETCP 1
Mitä tekee: Näyttää TCP-yhteyksien tilastot (esim. avatut, suljetut, virheet).
Mihin käytetään: Diagnosoi TCP-ongelmia, esim. liikaa avattuja yhteyksiä.
Kentät: active/s, passive/s, retrans/s (uudelleenlähetykset → verkko-ongelma).
top
pcp atop
pcp htop
systemd-cgtop -d 2
# Report vmstat -w like statistics using PCP
pmrep -b MB -t 2 :vmstat-w # or: vmstat -S m -w 2
# Report system overall process state statistics
pmrep -gp -t 2 :proc-os-stats