Operations 13 min read

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

This guide explains how to monitor a Linux server’s health by checking CPU load and core count, memory usage, disk I/O statistics, and network traffic with common command‑line tools such as uptime, top, free, iostat, iotop, nload and nethogs, and shows how to interpret the results to identify bottlenecks.

Raymond Ops
Raymond Ops
Raymond Ops
How to Monitor Linux System Performance: CPU, Memory, Disk I/O & Network

Linux System Monitoring

1. CPU

Load average : Use uptime to view the 1‑, 5‑, and 15‑minute load averages. A server is considered overloaded when the load exceeds the number of logical CPUs (e.g., ≥ 3 for a single‑core system, ≥ 12 for a four‑core system).

Logical CPU count : grep -c 'processor' /proc/cpuinfo returns the number of logical processors.

Top CPU consumers : Run top and press P to sort by %CPU. Example output:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
720 root 20 0 473464 22060 19128 S 1.7 0.2 119: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

Note that on a multi‑core system a process can exceed 100 % CPU (e.g., up to 400 % on a 4‑core CPU).

Per‑CPU utilization : In top, press 1 to display a line for each CPU, e.g.:

%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

High load together with high per‑CPU usage and a run‑queue > 3 indicates a busy CPU.

2. Memory

Total and used memory : free -h provides a human‑readable summary.

total   used   free  shared  buff/cache  available
Mem:          9.7Gi  2.1Gi  5.4Gi   49Mi     2.3Gi       7.3Gi
Swap:          0B    0B     0B

Key fields: total, used, free, shared, buff/cache, available. Swap is used only when physical RAM is exhausted.

Processes using most memory : In top, press M to sort by %MEM and e to toggle units (M, G, T). Example output:

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

3. Disk I/O

Device read/write activity : iostat -dkp shows per‑device statistics (tps, kB_read/s, kB_wrtn/s, total kB read/write). Example:

Device    tps  kB_read/s  kB_wrtn/s  kB_read  kB_wrtn
sda       0.64   16.17      58.90   487458  1775844
sda6      0.63   15.79      58.90   476129  1775748

Processes causing the most I/O : iotop -o lists only processes performing I/O. Example:

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 /

If CPU and memory appear idle while the system feels sluggish, the bottleneck is often disk I/O; upgrading to enterprise‑grade SSDs can alleviate it.

4. Network

Overall bandwidth : nload -u h displays incoming and outgoing traffic in human‑readable units.

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

Per‑process bandwidth usage : sudo nethogs lists processes with their sent/received rates.

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.070 KB/sec
CPU diagram
CPU diagram
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.

networkLinuxCPUMemorysystem-monitoringDisk I/O
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

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.