Operations 15 min read

How to Monitor Linux System Performance: CPU, Memory, Disk I/O, and Network

This guide explains how to monitor a Linux server’s key resources—including CPU load, memory usage, disk I/O, and network bandwidth—using built‑in commands such as uptime, top, free, iostat, iotop, nload and nethogs, and shows how to interpret the results to identify performance bottlenecks.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Monitor Linux System Performance: CPU, Memory, Disk I/O, and Network

Linux System Environment Monitoring

Linux system environment mainly monitors CPU, memory, disk I/O and network traffic.

1. CPU

(1) View CPU load: uptime

You can view overall load with uptime.

If the server has 1 CPU core, a 1‑minute load average >=3 indicates high load; for 4 cores, load >=12 is high.

root@ubuntu1804:~# uptime
09:57:53 up 7:17, 2 users, load average: 0.10, 0.03, 0.01
# current time
# users
# load average: system load (average number of processes in the run queue) for 1, 5, 15 minutes

(2) View logical CPU count

ehigh@ubuntu:~$ grep -c 'processor' /proc/cpuinfo
8

CPU: central processing unit.

Slots: number of physical CPUs installed
Cores: number of cores per physical CPU
Logical processors: number of logical CPUs (via hyper‑threading)
Hyper‑threading: technique that allows a single CPU core to appear as two logical processors

CPU development history: initially a physical CPU had a single core; later Intel introduced hyper‑threading; then multi‑core architectures placed multiple cores on one die.

Example: a server with a 4‑core, 8‑thread CPU has 4 cores and supports hyper‑threading, resulting in 8 logical CPUs.

(3) Find processes using most CPU: top

In top, press uppercase P to sort by CPU usage.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
720 root 20 0 473464 22060 19128 S 1.7 0.2 55.14 sunloginclient
3590 emqx 20 0 3483576 201492 74484 S 1.3 2.0 39.37 beam.smp
984 root 20 0 2754328 50696 5192 S 1.0 0.0 32.96 taosd

A process’s CPU usage can exceed 100%; on a 4‑core CPU it can reach 400%.

How to judge if CPU is busy?

Consider both CPU usage and load average; if the 1‑minute load >3 and CPU usage is high, the CPU is busy.

(4) View CPU usage per core: top

Press 1 in top to display each CPU’s details.

top - 10:48:44 up 5 days, 1:15, 1 user, load average: 0.10, 0.14, 0.10
%Cpu0 : 0.0 us, 3.4 sy, 0.0 ni, 96.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

2. Memory

(1) View memory size and usage

root@ubuntu:~# free -h
              total        used        free      shared  buff/cache   available
Mem:           9.7Gi       2.1Gi       5.4Gi        49Mi       2.3Gi       7.3Gi
Swap:          0B          0B          0B

Columns: total, used, free, shared, buff/cache, available. Swap is disk space used as virtual memory.

(2) Find processes using most memory: top

In top, press uppercase M to sort by memory usage; press e to change units.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1377 mysql 20 0 4.8g 0.8g 0.0g S 0.7 7.8 67:01.24 mysqld
977 root 20 0 7.7g 0.3g 0.0g S 0.0 3.4 32:34.83 java
3590 emqx 20 0 3.3g 0.2g 0.1g S 0.7 2.0 64:48.04 beam.smp
446 root 19 -1 0.3g 0.2g 0.2g S 0.0 2.0 1:59.99 systemd-journ

3. Disk I/O

(1) View processes with most disk read/write: iostat

root@ubuntu1804:~# iostat -dkp
Device    tps  kB_read/s  kB_wrtn/s  kB_read  kB_wrtn
sda       0.64   16.17      58.90    487458   1775844
sda1      0.01    0.20       0.00     5893      96
sda6      0.63   15.79      58.90   476129   1775748

kB_read/s = kilobytes read per second; kB_wrtn/s = kilobytes written per second.

When a server feels sluggish despite low CPU and sufficient memory, the bottleneck is often disk I/O; enterprise SSDs can improve performance.

(2) Find processes with highest disk I/O: iotop

root@ubuntu1804:~# iotop -o
Total DISK READ : 5.79 M/s | Total DISK WRITE : 2.28 M/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO% COMMAND
17238 be/4 tom 5.79 M/s 0.00 B/s 0.00 % 64.19 % find /
17092 be/4 root 0.00 B/s 0.00 B/s 0.00 % 12.71 % [kworker/u256:0]
476  be/3 root 0.00 B/s 2.28 M/s 0.00 % 5.45 % [jbd2/sda6-8]

4. Network

(1) Monitor overall bandwidth with nload

tom@ubuntu1804:~$ nload -u h
Device eth0 [10.0.0.18]:
Incoming: Curr 558.33 kBit/s Avg 297.12 kBit/s Min 1.39 kBit/s Max 894.77 kBit/s Ttl 58.23 MByte
Outgoing: Curr 16.16 kBit/s Avg 15.37 kBit/s Min 4.52 kBit/s Max 32.62 kBit/s Ttl 766.79 kByte

(2) Find processes using most bandwidth with nethogs

tom@ubuntu1804:~$ sudo nethogs
PID USER PROGRAM DEV SENT RECEIVED
1733 root wget eth0 13.352 4317.425 KB/sec
1605 tom sshd: tom@pts/0 eth0 1.025 0.07013.276 KB/sec
TOTAL 0.000 0.000 KB/sec 14.378 4317.701
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CPUMemorysystem-monitoringDisk I/O
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.