How to Monitor System Performance in Linux


 Introduction


System performance monitoring is one of the most important tasks for Linux administrators. It helps you detect resource bottlenecks, high CPU usage, memory leaks, or disk issues before they impact users. Linux provides several built-in commands and tools for performance monitoring.


Step 1: Check CPU Usage


To monitor CPU usage in real-time:


top


Or use a more user-friendly view:


htop


➡️ htop provides color-coded output and interactive features.


Step 2: Monitor Memory Usage


Check memory consumption with:


free -h


Output shows total, used, free, and available memory.


You can also use:


vmstat 5


This displays CPU, memory, and process statistics every 5 seconds.


Step 3: Monitor Disk Usage


To check disk space:


df -h


To see detailed file and folder sizes:


du -sh /path/to/folder


To check disk I/O performance:


iostat -xz 1


Step 4: Monitor Network Usage


Check network statistics:


ifconfig


Or monitor live traffic per interface:


iftop


Step 5: System-Wide Performance Reports


Use the sar command (from sysstat package):


sar -u 5 10


➡️ Shows CPU usage every 5 seconds, repeated 10 times.


Step 6: Graphical Monitoring Tools


GNOME System Monitor – GUI-based performance tool.


nmon – Advanced monitoring tool for CPU, memory, network, and more.


Conclusion

Linux provides powerful built-in tools for monitoring system performance. By regularly checking CPU, memory, disk, and network usage, administrators can identify issues early and maintain a stable, optimized system.

Comments