ps — Process Status
ps shows running processes.
Common usage
ps # Your processes in current shell
ps aux # ALL processes, detailed
ps -ef # All processes, full format
ps -u student # Processes for user 'student'
ps aux output explained
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 168M 10M ? Ss 10:00 0:01 /sbin/init
| Column | Meaning |
|---|
| USER | Owner |
| PID | Process ID |
| %CPU | CPU usage |
| %MEM | Memory usage |
| VSZ | Virtual memory |
| RSS | Physical memory |
| STAT | Process state |
| START | Start time |
| COMMAND | Command name |
Process states (STAT)
| State | Meaning |
|---|
| R | Running |
| S | Sleeping |
| D | Uninterruptible sleep |
| Z | Zombie |
| T | Stopped |
Finding processes
ps aux | grep nginx
ps aux | grep -v grep | grep python
pgrep nginx # Just the PIDs
Process tree
ps -ejH # Hierarchical
pstree # Visual tree