Viewing Running Processes
Basic Process Viewing Commands
ps Command
The ps
command provides a snapshot of current processes:
## List all processes for current user
ps
## List all processes
ps aux
Top Command
Interactive real-time process viewer:
## Launch top command
top
Process Status Attributes
Attribute |
Description |
PID |
Process Identification Number |
USER |
Process Owner |
%CPU |
CPU Usage Percentage |
%MEM |
Memory Usage Percentage |
STATE |
Current Process State |
Advanced Process Viewing Techniques
Filtering Processes
## Find specific process
ps aux | grep process_name
## List background jobs
jobs
Process State Workflow
graph TD
A[Process Start] --> B{Process State}
B -->|Running| C[Active Execution]
B -->|Stopped| D[Suspended]
B -->|Background| E[Running Independently]
B -->|Zombie| F[Completed but Not Cleared]
pgrep
: Search processes by name
pidof
: Find process ID
htop
: Enhanced interactive process viewer
Best Practices
- Regularly monitor system processes
- Identify resource-intensive tasks
- Understand process relationships
At LabEx, we emphasize mastering process management for efficient system administration.