How to check server resource usage: CPU, RAM and disk (top, htop, free, df)
This guide shows you how to check server resource usage on a Linux VPS or dedicated server: CPU, RAM, disk space and load, using top, htop, free and df, plus the WHM and CloudLinux tools. It helps you find out why a server is slow and which site or process is responsible.
1. Quick overview: uptime and load average
uptime
The three numbers at the end are the load average for the last 1, 5 and 15 minutes. Compare them to the number of CPU cores (nproc). A load close to the core count is busy; much higher means processes are waiting.
2. Live view: top and htop
top
- Press
Pto sort by CPU andMto sort by memory. Pressqto quit. - The %wa value in the CPU line is time waiting for disk. A high value means the disk is the bottleneck, not the CPU.
- The USER column shows which cPanel account owns a process.
htop is easier to read, with colours and mouse support. Install it from EPEL:
dnf install -y epel-release
dnf install -y htop
htop
In htop, F6 sorts, F4 filters by name and F5 shows a tree of parent and child processes.
3. Memory: free
free -h
Look at the available column, not free. Linux uses spare RAM as disk cache and gives it back when needed, so low "free" is normal. Worry when available is low and Swap used keeps growing.
4. Disk space: df and du
df -h
df -i
df -h shows space per partition; df -i shows inodes (number of files). A disk can be "full" because of millions of small files even when space is left. To find what fills the disk, see How to find large files and free disk space on Linux.
5. Disk activity and processes over time
vmstat 2 5
dnf install -y iotop && iotop -o
vmstat prints memory, swap and CPU every 2 seconds, five times. iotop -o shows only processes that are reading or writing to disk right now.
6. Tools in WHM and CloudLinux
- WHM > Server Status > Service Status: service health, load and disk summary.
- WHM > Process Manager: running processes with the option to stop one.
- WHM > Daily Process Log: which accounts used the most CPU and memory during the day.
- CloudLinux LVE Manager (in WHM plugins): usage per cPanel account and how often each account hit its limits. From SSH,
lvetopshows live usage per account. Hitting limits often means the site needs optimisation or a bigger plan.
wp-cron. Check the busiest account first, then its access logs. See How to Speed Up Your WordPress Website.Common problems
- Load is high but CPU is idle: look at %wa; the disk is slow or overloaded, often during backups.
- The server is out of memory and processes are killed: check
dmesg -T | grep -i "out of memory". Reduce PHP/MySQL memory settings or upgrade RAM. - One
php-fpmorlsphpuser uses most CPU: that cPanel account is busy or under attack. Review its traffic.
Frequently asked questions
Is swap usage bad?
A little swap is normal. Constant swap use with low available RAM means the server needs more memory or fewer heavy processes.
When should I upgrade my VPS?
When usage is high during normal traffic, not just during an attack or backup. See VPS or dedicated server: which one do you need? or ask support for advice.