← Back to team overview

graphite-dev team mailing list archive

[Question #220056]: IO statistics 100 times bigger

 

New question #220056 on Graphite:
https://answers.launchpad.net/graphite/+question/220056

I'm trying to plot IO reads and writes in Graphite and I have stumbled upon a bit of a discrepancy of the plotted graphs and  what's happening on the server. What I'm seeing on the server when the HIgh IO is happening is the following (this is the output from sar -b  command):

10:15:01 AM       tps          rtps         wtps   bread/s   bwrtn/s
10:36:02 AM    200.30    113.70     86.60   2935.73   4517.49

bread and bwrtn and blocks read and blocks written - equivalent to sectors. This gives us the rates of 2935*512/1024 = 1467.50kB/s

Now, I'm sending IO stats to Graphite like this: 
1.) I read the data from /proc/diskstat (3rd and 7th field) - nr of sectors read and written
2.) I multiply them by 512 and divide by 1024 -> which is equivalent to dividing the read value by 2 ie readvalue/2
3.) send the value to Graphite - this should basically be number of kBytes

In the Graphite I'm trying to plot it with the following function:
nonNegativeDerivative(stats.app01.disk.xvda.kbytesRead)

Which should give me the rate in kB/s , however Graphite seems to be plotting values 100 times bigger...
Applying the scaleToSeconds function borks the resulting plot even more....ie
scaleToSeconds(nonNegativeDerivative(stats.app01.disk.xvda.kbytesRead),1)

Anyone idea what I'm doing wrong ?
Thanks

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.