Skip to content

Instantly share code, notes, and snippets.

@phunehehe
Created January 24, 2014 10:21
Show Gist options
  • Save phunehehe/8595007 to your computer and use it in GitHub Desktop.
Save phunehehe/8595007 to your computer and use it in GitHub Desktop.
[twistd]
user munin
#!/bin/bash
case $1 in
config)
cat <<'EOM'
graph_title Twisted Open Files
graph_vlabel nofile
nofile.label nofile
EOM
exit 0;;
esac
printf "nofile.value "
/usr/bin/sudo /usr/sbin/lsof -c twistd | wc -l
munin ALL=(ALL) NOPASSWD:/usr/sbin/lsof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment