Linux SSH commands to show and monitor server resources and real-time performance: memory, swap, disk usage, CPU usage and I/O

Below are a few general commands found in most popular Linux distros which you can use via SSH to check the status of your hosting server.

To show used and available RAM memory and swap space usage:

free -m

To show current disk storage usage by mounted device:


To show disk usage statistics of the current directory by directories and files:


To show the hard disk space a directory or a file takes up:

du filename

To show the length of time this server has been up and the server loads in the past 1 minute, 5 minutes and 15 minutes:


To display a real-time updated server resource usage including: server uptime, user logged on, load average, current tasks, CPU usage, memory usage and swap usage:


To display a list of real-time active or sleeping processes your server is up to:


To show some information about the current status of virtual memory, CPU usage, I/O usage:


This is also a good tool to find out system performance bottlenecks.

To display currently logged on users on the system:




To print a full screen text graph of the server load refreshed every few seconds:


If you are on shared hosting, chances are your server usage has been imposed some hard limits such as the largest amount of files / directories possible and the hard storage limit. View them by: