Skip to content

Instantly share code, notes, and snippets.

@andphe
Created September 11, 2015 01:55
Show Gist options
  • Select an option

  • Save andphe/2a08eab7fb4148d33888 to your computer and use it in GitHub Desktop.

Select an option

Save andphe/2a08eab7fb4148d33888 to your computer and use it in GitHub Desktop.

Revisions

  1. andphe created this gist Sep 11, 2015.
    39 changes: 39 additions & 0 deletions graphite.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    --- graphite.ph 2015-09-06 12:59:52.062146603 -0500
    +++ /usr/share/collectl/graphite.ph 2015-09-08 23:00:11.935957179 -0500
    @@ -173,6 +173,7 @@
    sendData('ctxint.int', 'intrpts/sec', $intrpt/$intSecs);
    sendData('ctxint.proc', 'pcreates/sec', $proc/$intSecs);
    sendData('ctxint.runq', 'runqSize', $loadQue);
    + sendData('ctxint.run', 'runSize', $loadRun);

    # these are the ONLY fraction, noting they will print to 2 decimal places
    sendData('cpuload.avg1', 'loadAvg1', $loadAvg1, 2);
    @@ -217,6 +218,10 @@
    sendData("diskinfo.readkbs.$dskName", 'readkbs/sec', $dskReadKB[$i]/$intSecs);
    sendData("diskinfo.writes.$dskName", 'writes/sec', $dskWrite[$i]/$intSecs);
    sendData("diskinfo.writekbs.$dskName", 'writekbs/sec', $dskWriteKB[$i]/$intSecs);
    + sendData("diskinfo.quelen.$dskName", 'queueSize/sec',$dskQueLen[$i]/$intSecs);
    + sendData("diskinfo.wait.$dskName", 'waittime/sec', $dskWait[$i]/$intSecs);
    + sendData("diskinfo.svctime.$dskName", 'svctime/sec', $dskSvcTime[$i]/$intSecs);
    + sendData("diskinfo.util.$dskName", 'util/sec', $dskUtil[$i]/$intSecs);
    }
    }

    @@ -373,10 +378,14 @@
    next if ($netFiltKeep eq '' && $netName=~/$netFiltIgnore/) || ($netFiltKeep ne '' && $netName!~/$netFiltKeep/);
    next if $netName=~/lo|sit/;

    - sendData("nettotals.kbin.$netName", 'kb/sec', $netRxKB[$i]/$intSecs);
    - sendData("nettotals.pktin.$netName", 'kb/sec', $netRxPkt[$i]/$intSecs);
    - sendData("nettotals.kbout.$netName", 'kb/sec', $netTxKB[$i]/$intSecs);
    - sendData("nettotals.pktout.$netName", 'kb/sec', $netTxPkt[$i]/$intSecs);
    + sendData("netinfo.kbin.$netName", 'kb/sec', $netRxKB[$i]/$intSecs);
    + sendData("netinfo.pktin.$netName", 'pk/sec', $netRxPkt[$i]/$intSecs);
    + sendData("netinfo.kbout.$netName", 'kb/sec', $netTxKB[$i]/$intSecs);
    + sendData("netinfo.pktout.$netName", 'pk/sec', $netTxPkt[$i]/$intSecs);
    + sendData("netinfo.errin.$netName", 'err/sec',$netRxErr[$i]/$intSecs);
    + sendData("netinfo.errout.$netName", 'err/sec',$netTxErr[$i]/$intSecs);
    + sendData("netinfo.drpin.$netName", 'pk/sec', $netRxDrp[$i]/$intSecs);
    + sendData("netinfo.drpout.$netName", 'pk/sec', $netTxDrp[$i]/$intSecs);
    }
    }