Essential Monitoring Commands
ps - Process Status
## List all processes
ps aux
## List processes for current user
ps u
## Show process hierarchy
ps -ef
Top - Real-time Process Monitoring
## Interactive process viewer
top
## Batch mode with specific iterations
top -n 1
htop - Interactive Process Viewer
## Install htop
sudo apt install htop
## Launch htop
htop
Job Monitoring Workflow
graph TD
A[Start Monitoring] --> B{Select Tool}
B --> |ps| C[Static Process List]
B --> |top| D[Real-time Monitoring]
B --> |htop| E[Interactive View]
Tool |
Real-time |
Interactive |
Resource Usage |
Detailed View |
ps |
No |
No |
Low |
Basic |
top |
Yes |
Yes |
Medium |
Moderate |
htop |
Yes |
Yes |
Higher |
Comprehensive |
System-wide Monitoring
## Check system load
uptime
## View process tree
pstree
## Monitor system resources
vmstat
## Install performance tools
sudo apt install sysstat
## CPU utilization
mpstat
## I/O statistics
iostat
Best Practices
- Use multiple tools for comprehensive monitoring
- Understand each tool's strengths
- Regularly check system performance
LabEx recommends mastering these monitoring techniques for effective Linux system management.