Skip to main content
A strong digital foundation for your business.

Knowledge Base

Practical guides that make your hosting, domain and virtual server services easier to understand.

Monitoring CPU, RAM, disk and network on a Linux server (including steal time)

The CPU, RAM and disk gauges in the client area give you a quick overview, but to find the cause of a slowdown you need the tools inside the server. This guide explains what each command measures, when a value should count as a problem and how to interpret steal time.

Client area gauges and in-server tools

The usage gauges in the client area are the fastest way to see whether the server is under strain overall. They do not show which process is consuming CPU, where the memory is going or why the disk has slowed down, though. For that, connect over SSH and use the tools below. top, free, df and ss are available on almost every installation; you can install the others as follows:

Bash
# Ubuntu/Debian
sudo apt install sysstat htop iotop vnstat nload iftop
# AlmaLinux 9 (htop, vnstat, nload and iftop are in the EPEL repository)
sudo dnf install epel-release
sudo dnf install sysstat htop iotop vnstat nload iftop

CPU: load average, top fields and steal time

The uptime command shows the load average for the last 1, 5 and 15 minutes. The load average is the average number of processes running on or waiting for a CPU, plus those waiting on uninterruptible disk I/O. On its own it means little; read it together with the number of vCPUs. If nproc reports 4, a load close to 4 means full utilization, while a sustained 6–8 means work is piling up in the queue. If the load is high but CPU usage is low, processes are most likely waiting for the disk.

Bash
uptime
nproc
top

The %Cpu(s) line at the top of the top screen is the most informative one. Press 1 to show each vCPU separately, P to sort by CPU usage and M to sort by memory usage.

  • us / sy: Time spent on applications (user space) and on the kernel. If us is high, the problem is usually in the application: PHP, a slow database query, compression or a build.
  • wa (iowait): Time the CPU sits idle waiting for disk I/O. A consistently high wa shows that the bottleneck is the disk, not the CPU.
  • st (steal): Time a virtual CPU was ready to run but had to wait for the physical processor.
  • id: Idle time.

htop offers a more readable view. To see steal and iowait as separate parts of the bars, enable "Detailed CPU time" under F2 → Display options.

How should you interpret steal time?

On virtual servers, the hypervisor schedules the physical processors among the virtual machines on the same hardware. Steal is the time your virtual CPU was ready to run but waited for its turn. VPS packages use shared vCPUs, and on shared resources steal can appear, especially at busy times. Occasional steal of a few percent is normal. VMware ESXi, however, reports steal time to the guest only when a separate setting is enabled on the virtual machine, so st may show a constant 0 on your server. A 0 does not mean the CPU never waited, so do not read the steal value in isolation: interpret it together with the load average, the us value and your application's response times.

If steal stays high, for example above 10% for minutes at a time, record the measurements with timestamps and open a support ticket:

Bash
# Take timestamped measurements and attach the output to your support ticket
date; vmstat 1 10
date; mpstat -P ALL 1 5

In the vmstat output, the r column shows the number of processes waiting to run and the st column shows the steal percentage; mpstat gives the same information for each vCPU (%steal). In the ticket, state the date and time of the measurement, your server's IP address and the workload running at that moment. For other details worth including, see the support ticket guide.

Memory: free, available and the top memory users

In the free -h output, the column to look at is available, not free. Linux uses spare memory as disk cache (buff/cache) and hands it back when applications need it, so a low free value is normal. available is the estimated amount of memory that can be given to new applications without swapping.

Bash
free -h
ps aux --sort=-%mem | head -n 15
# Total memory of processes with the same name (for multi-process services such as PHP-FPM)
ps -eo comm,rss --no-headers | awk '{m[$1]+=$2} END {for (p in m) printf "%8.0f MB  %s\n", m[p]/1024, p}' | sort -rn | head
vmstat 1 5

The RSS column in the ps output shows the physical memory a process actually uses, in KB. For multi-process services such as PHP-FPM, Apache or Node.js, look at the total for all processes with the same name rather than a single process. The si and so columns in the vmstat output show memory read from and written to swap per second. Having data in swap is not a problem by itself, but si/so values that stay above zero show that memory is running short. In that case, see the swap and OOM guide.

Disk: latency, usage and inodes

iostat -xz 1 prints detailed per-disk statistics every second (-z hides idle devices). Look at these columns:

  • r_await / w_await: The average time in milliseconds for read and write requests to complete (a single await column in older sysstat versions). Single-digit values are normal on SSDs; tens or hundreds of milliseconds sustained over time indicate a bottleneck.
  • aqu-sz: The average number of requests in the device queue.
  • %util: The share of time the device was busy. On devices that can process many requests in parallel, such as SSDs behind a RAID controller, 100% does not always mean saturation, so read it together with the await values.
Bash
iostat -xz 1 5
sudo iotop -oPa
df -h
df -i

iotop -oPa shows only the processes doing disk I/O, with accumulated totals. If iotop warns about "task_delayacct" on newer kernels, you can turn the counters on temporarily with sudo sysctl kernel.task_delayacct=1. df -h shows how full each file system is, and df -i shows inode usage: even if the disk looks empty, no new files can be created once the inodes run out. For the steps to take when the disk fills up, see the disk full guide.

Network: connections, live traffic and monthly totals

Every server has a 1 Gbit port. On the network side, three questions matter: which ports are listening, how many connections are open, and how much traffic is flowing? Find your interface name with ip -br addr and use it in place of ens160 in the examples.

Bash
# Connection summary and listening ports
ss -s
sudo ss -tulpn
ip -br addr
# Live traffic: interface totals and per connection
nload ens160
sudo iftop -i ens160
# vnStat: persistent traffic counter (daily and monthly)
sudo systemctl enable --now vnstat
vnstat -d
vnstat -m

ss -s shows total connection counts, and ss -tulpn shows the listening ports and the processes that opened them. If you see a port you did not expect, close it with the steps in the firewall guide. vnStat is lightweight because it reads kernel counters, and it keeps its data across reboots; after installation, it may take a few minutes for the first data to appear.

Historical data and continuous monitoring

If the problem happened at 3:00 a.m., live tools are of no use. The sysstat package takes a measurement every 10 minutes by default, and sar lets you read that data back.

Bash
# Debian/Ubuntu: turn collection on if it is disabled
sudo sed -i 's/^ENABLED="false"/ENABLED="true"/' /etc/default/sysstat
# On all distributions
sudo systemctl enable --now sysstat
# Today's CPU (including steal), memory and disk history
sar -u
sar -r
sar -d -p
# A specific time range
sar -u -s 02:00:00 -e 04:00:00
# An earlier day (Debian/Ubuntu: /var/log/sysstat, AlmaLinux: /var/log/sa)
sar -u -f /var/log/sysstat/sa15

The sar -u output also includes the %steal and %iowait columns, so you can use it as a record of past hours when you report a problem in a support ticket.

Graphs and alerts

  • Netdata: Shows hundreds of metrics at one-second resolution in its own web interface and comes with ready-made alerts (netdata.cloud). Do not expose the interface (port 19999 by default) to the internet; keep it closed in the firewall and reach it through an SSH tunnel.
  • Prometheus node_exporter: Serves metrics on port 9100, which a separate Prometheus and Grafana server collects; it suits you if you monitor several servers. On Ubuntu and Debian, install it with the prometheus-node-exporter package. Allow port 9100 only from your monitoring server's IP address.
Bash
# Reach the Netdata interface through an SSH tunnel (run this on your own computer,
# then open http://localhost:19999 in your browser)
ssh -L 19999:localhost:19999 root@SERVER_IP
# Open the node_exporter port only to the monitoring server
sudo ufw allow from 198.51.100.20 to any port 9100 proto tcp

No tool inside the server can alert you when the server is completely unreachable. Use an uptime monitoring service that regularly checks your website or SSH port from the outside, and have its alerts sent to you by email or message.

Threshold table and the upgrade decision

The values below are a general starting point. Work out what is normal for your own workload by watching the sar data for a few days.

MetricNormalWatch outWhat to do
Load average (15 min)Below the vCPU countConsistently above 1.5 times the vCPU countFind the process with top; work out whether the load comes from the CPU or the disk
%waBelow 5%Consistently above 20%Find the process using the disk with iostat -xz 1 and iotop -oPa
%st0–2Above 10% for minutes at a timeOpen a support ticket with vmstat 1 10 and mpstat output
RAM (available)Above 20% of the totalBelow 10%, or OOM entries in the logReview the services' memory settings and add swap
Swap si/so0Consistently above zeroLimit the memory-hungry service or upgrade RAM
Disk usage (df -h)Below 80%Above 90%Clean up or grow the disk
Inodes (df -i)Below 80%Above 90%Find the directory where small files pile up

If the measurements show that the problem comes from a lack of resources rather than from configuration (consistently high us and load despite tuning, regular swap use, a disk that keeps filling up), consider upgrading your package. The upgrade steps are in the resource upgrade guide, the differences between the product families are on the VDS vs VPS page, and sizing is covered on the choosing CPU, RAM and SSD resources page.

Measure first, then decide

Do not base an upgrade decision on a single snapshot value. Once sysstat has collected a few days of data, compare the sar -u, sar -r and sar -d -p output for your busy hours; which resource is the bottleneck is usually clear from that comparison.

Frequently asked questions

CPU usage looks low, but my site is slow. Why?

The total CPU percentage is the average across all vCPUs. A single-threaded process (for example a heavy PHP request or a database query) can fully load one core on a 4-vCPU server while total usage shows only 25%. Watch each vCPU separately by pressing 1 in top, and check the wa value and the database's slow query log. The slowness can also come from an API outside the server or from DNS resolution.

Can I see steal time on a VDS package too?

Steal can appear whenever a virtual CPU waits for the physical processor, and the way to interpret it is the same whatever the package type. For the resource wording on the package cards and the differences between the two product families, see the VDS vs VPS page. If the value stays high, open a support ticket with your measurements.

Which monitoring tools should I leave running all the time?

sysstat and vnStat use very few resources and provide historical data, so they can stay on every server. Netdata uses more memory, so take that into account on small packages. htop, iotop and iftop are interactive tools you only open when there is a problem.

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.