Created
October 21, 2010 16:01
-
-
Save pitluga/638755 to your computer and use it in GitHub Desktop.
monitors memory usage of passenger rails processes and stuff monitored by monit. useful with watch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
passenger-status 10614 | grep global | |
echo | |
passenger-memory-stats 10614 | grep Rails | |
echo | |
/usr/local/bin/monit -c /srv/apps/ruby-app/current/config/monitrc -p /srv/apps/ruby-app/shared/pids/monit.pid -s /srv/apps/ruby-app/shared/system/monit.state status | awk '/Process/ { process=$2} /memory kilobytes tot/ { printf "%50s %7s\n", process, $4} ' | sed -e '$!N;s/\n//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment