Monitoring tools help track system performance, process status, and resource utilization in real-time.
1. htop: Interactive Process Viewer
## Install htop
sudo apt-get install htop
## Launch interactive process monitor
htop
2. iotop: I/O Monitoring
## Install iotop
sudo apt-get install iotop
## Monitor disk I/O
sudo iotop
System Resource Monitoring
graph TD
A[System Monitoring Tools] --> B[Process Monitoring]
A --> C[Resource Tracking]
B --> D[htop]
B --> E[ps]
C --> F[top]
C --> G[vmstat]
Tool |
Purpose |
Key Features |
top |
System overview |
CPU, Memory usage |
vmstat |
Virtual memory statistics |
System performance |
iostat |
I/O statistics |
Disk performance |
netstat |
Network statistics |
Connection tracking |
Network Monitoring
## Real-time network connection monitoring
watch -n 1 "netstat -tuln"
## Track network traffic
sudo iftop
1. journalctl: System Logs
## View system logs
journalctl -f
## Filter specific service logs
journalctl -u nginx.service
2. logrotate: Log Management
## Check logrotate configuration
cat /etc/logrotate.conf
## System performance overview
vmstat 1 5
LabEx Monitoring Recommendations
- Use multiple monitoring tools
- Combine real-time and historical tracking
- Focus on key performance indicators
Advanced Monitoring Techniques
## Complex monitoring pipeline
watch -n 2 "ps aux | grep python && free -h"
Monitoring Best Practices
- Minimize monitoring overhead
- Use selective tracking
- Implement automated alerts
- Regularly review monitoring strategies