Ubuntu Tools – System Monitoring
This article provides essential commands and tools to monitor system performance, CPU, memory, disk, and network activity on Ubuntu servers.
1) CPU & Load
# Show system uptime and load averages
uptime
# Detailed CPU info
lscpu
# Real-time processes (default monitor)
top
# Better process monitor (install if missing)
sudo apt install htop -y
htop
2) Memory Usage
# Human-readable memory usage
free -h
# Monitor memory per process
smem -r -k
3) Disk Usage
# Show usage of all mounted disks
df -h
# Show usage of a specific folder
du -sh /var/log
4) Disk I/O
# Install iotop for real-time disk I/O monitoring
sudo apt install iotop -y
sudo iotop
5) Network Activity
# Show all listening ports and processes
ss -tulnp
# Real-time network usage
sudo apt install iftop -y
sudo iftop -i eth0
# Check packet statistics
netstat -s
6) System Logs
# General system log
journalctl -xe
# View logs for a specific service (example: SSH)
journalctl -u ssh
7) Hardware & System Info
# Show detailed system hardware summary
sudo lshw -short
# Check disk devices
lsblk
# Show kernel version
uname -r
8) Monitoring Tools (Optional)
- htop – Interactive CPU/memory/process monitor.
- glances – All-in-one monitoring tool (install:
sudo apt install glances -y). - nmon – Performance monitor with text UI (install:
sudo apt install nmon -y).
These monitoring tools and commands help identify performance issues and keep your Ubuntu server running smoothly.