Extract Memory Usage As Integer

free -m | grep Mem | awk '{print $3}'

Use that and feed memory usage into a graphite server every minute from a cron script:

*/1 * * * * echo "some.system.memoryusage `free -m | grep Mem | awk '{print $3}'` `date +%s`" | nc graphite.somedomain.com 2003

Leave a Reply