Skip to content

Instantly share code, notes, and snippets.

@olegp
Created April 16, 2011 12:01
Show Gist options
  • Save olegp/923063 to your computer and use it in GitHub Desktop.
Save olegp/923063 to your computer and use it in GitHub Desktop.
Cloudkick custom plugin for checking the number of inodes in use
#!/bin/bash
echo "status ok ok"
arr=$(df -i | grep xvda | tr "\t" "\n")
OLD_IFS="$IFS";
IFS=" ";
vars=( $arr );
IFS="$OLD_IFS"
echo "metric Inodes int" ${vars[1]}
echo "metric IUsed int" ${vars[2]}
echo "metric IFree int" ${vars[3]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment