Skip to content

Instantly share code, notes, and snippets.

@netshade
Created February 2, 2012 19:36
Show Gist options
  • Save netshade/1725305 to your computer and use it in GitHub Desktop.
Save netshade/1725305 to your computer and use it in GitHub Desktop.
Track Nginx Proc Count
while :; do (ps -o command -U YOUR_APP_USER | awk "/Rack:/ {print $1 $2}" | wc -l | { read procs; echo "hello version 1.0\nauthenticate YOUR_API_KEY\ngauge nginx.proc.num $procs `date +%s`\n" } ) | nc instrumentalapp.com 8000; sleep 60; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment