Tuesday, February 2, 2010

Bash script to monitor background processes

while [ 1 ]; do ps -ef | grep bzip2; echo "============================================="; sleep 5; done;

where:

bzip2: is the process name or part of the process name

Press Ctrl+c at any time to cancel the process

No comments: