Skip to content

How to monitor a Linux server

To monitor a Linux server you watch five things: CPU usage, memory, disk space, system load and network traffic. Ideally an agent measures them every few seconds, keeps the history and alerts you when something crosses a limit, like disk above 90%.

Published · ganyant

Which commands show it right now?

top or htop for CPU, memory and processes; df -h for each disk’s space; free -h for memory; uptime for load; and ss -tulpn to see which ports are open.

Which values are worrying?

A disk above 85 or 90% (when it fills up, the database and logs stop writing), memory always at the limit with swap in use, CPU at 100% for several minutes and sustained load above the number of cores.

What is system load?

The average number of processes waiting for CPU over the last 1, 5 and 15 minutes. On a 4-core server, a load of 4 is full use; if it stays at 8, processes are waiting and everything slows down.

Why isn’t checking now and then enough?

Because problems happen when you’re not looking: a disk filling with logs overnight or a memory leak that takes days. History lets you see the trend and get ahead of it.

How does ganyant do it?

The ganyant agent installs with one command, on Linux or Windows, and sends CPU, memory, swap, load, every disk and network every 15 seconds on Pro (every 5 on Agency). You can create alert rules, for example disk above 90%, and it also detects intrusion attempts. The code is a single Python file you can review.

Put it into practice, free

ganyant monitors your sites from 4 continents, audits their security every day and publishes your status page. Free plan.