Knowledgebase article

How to check your server's CPU, memory and disk usage

Is your server feeling heavy? A few simple commands tell you exactly how it's doing. Think of it as taking your server's pulse.

Disk space

df -h

Look at the Use% column. Above 90% means it's time to clean up. To find what's using the space:

du -sh /* 2>/dev/null | sort -h
du -sh /home/* | sort -h

The usual suspects are old backups, log files in /var/log, and cache folders.

Memory (RAM)

free -h

The available column is what really matters. If it's close to zero and swap is busy, the server needs more RAM, or an app is using too much.

CPU and busy processes

top

Press P to sort by CPU, M to sort by memory, q to quit. htop is a friendlier version (dnf install htop or apt install htop).

Load average (top right in top, or run uptime): as a rule of thumb, a load higher than your number of vCPUs for a long time means the server is overloaded.

What's listening on the network?

ss -tulpn

This shows which services are open to the internet. Close anything you don't need.

Logs to check when something breaks

Log What it tells you
journalctl -xe recent system errors
/var/log/messages or /var/log/syslog general system log
/var/log/secure or /var/log/auth.log login attempts
/var/log/httpd/ or /var/log/nginx/ web server errors

On a Managed Server with WHM

In WHM, look at Server Status > Service Status and Server Status > Server Information for a friendly view of load, memory and disk. And if anything looks wrong, open a ticket: on managed servers, Romeo looks after it for you.

Was this answer helpful?

Related articles

Still stuck? Romeo's got you.
Our support team replies around the clock, real humans who know your server.