Skip to content

Instantly share code, notes, and snippets.

@jarajapu
Created November 19, 2013 00:39
Show Gist options
  • Save jarajapu/7538115 to your computer and use it in GitHub Desktop.
Save jarajapu/7538115 to your computer and use it in GitHub Desktop.

Revisions

  1. jarajapu created this gist Nov 19, 2013.
    10 changes: 10 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    ##/bin/bash

    set -e
    while true; do
    awk -v now=`date +%s` -v host=`hostname` \
    '{ print "put proc.loadavg.1m " now " " $1 " host=" host; \
    print "put proc.loadavg.5m " now " " $2 " host=" host }' \
    /proc/loadavg
    sleep 15
    done | nc -w 30 opentsdb 4242