Extract Memory Usage As Integer

·

,

[code]free -m | grep Mem | awk ‘{print $3}'[/code]

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

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

Leave a Reply

Discover more from Rich Collier

Subscribe now to keep reading and get access to the full archive.

Continue reading