Skip to content

Instantly share code, notes, and snippets.

@austinbv
Created August 3, 2011 14:14
Show Gist options
  • Select an option

  • Save austinbv/1122737 to your computer and use it in GitHub Desktop.

Select an option

Save austinbv/1122737 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo monit status | awk -F "[' ]" '/Process/ { p = $3; } /pid/ && !/parent/ { printf("%s\t%d\n", p, $NF); }' | sort > resque.log
sudo monit restart -g resque_workers
# compare first list with new list
# kill pid's if they did not change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment