Monitoring Activity
Nov 8, 2025
Managing shell jobs
- Use
command &to start a job in the background - To move a job to the background
- First, stop it by typing Ctrl-z
- Next, type
bgto move it to the background - Use
fgto bring it back to the foreground
- Use
jobsfor a complete overview of running jobs
Observing process information with ps
- The
pscommand has two different dialects: BSD and System V- In BSD, options do not have a leading -
- In System V, options do have a leading -
psshows an overview of current processesps auxshows an overview of all processesps -faxshows process forksps -fU {user}shows all processes owned by userps -f --forest -C sshdshows sshd and all the childrenps Llists format specifiersps -Lshows threadsps -eo pid,ppid,user,cmdexample of using format specifiers to get what you want
Monitoring memory usage
- Use
free -mto get details about current memory usage - More detailed memory information is in
/proc/meminfo
Write cache
- While writing files, a write cache (buffer) is used
- This write cache is periodically committed to disk by the
pdflushkernel thread - As a result, after committing a file write, it’s not immediately secure
- To ensure that a file is committed to disk immediately, use the
synccommand
Observing CPU load
- CPU load is checked through
uptime
Monitoring activity with top
topis a dashboard that allows you to monitor current system activity- Press
fto show and select from available display fields - Press
Mto filter on memory usage - Press
Wto save new display settings - Press
1to show the usage stats for all CPUs
Lab Exercise
- Use the appropriate utilities to find out if your machine performance is in good shape
Solution
- Use
top
- Clint Jordan