Skip to content

Instantly share code, notes, and snippets.

@momenbasel
Created May 4, 2020 18:44
Show Gist options
  • Save momenbasel/f3fbf09d4100dedaa7af1ac78947e506 to your computer and use it in GitHub Desktop.
Save momenbasel/f3fbf09d4100dedaa7af1ac78947e506 to your computer and use it in GitHub Desktop.
processMonitor.sh
#!/bin/bash
#loop by line
IFS=$'\n'
old_process=$(ps -eo command)
while true;do
new_process=$(ps -eo command)
diff <(echo "$old_process") <(echo "$new_process")
sleep 1
old_process=$new_process
done
#Task manager script for hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment