graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #03760
[Question #219798]: Calculate CPU percentage usage
New question #219798 on Graphite:
https://answers.launchpad.net/graphite/+question/219798
I'm trying to plot CPU usage in percentage of usage at certain point of time. To do this I take the samples from /proc/stat - these are absolute samples and they looks like this:
app01.cpu.total.user 45997117 1358816118
app01.cpu.total.nice 165511 1358816118
app01.cpu.total.system 36679893 1358816118
app01.cpu.total.idle 3519926642 1358816118
app01.cpu.total.iowait 3854916 1358816118
app01.cpu.total.irq 2553 1358816118
app01.cpu.total.softirq 189828 1358816118
app01.cpu.total.steal 4497297 1358816118
app01.cpu.total.guest 0 1358816118
The function I'm using to display these is:
scale(divideSeries(stats.app01.cpu.total.user,sumSeries(stats.app01.cpu.total.*)), 100)
Which should basically display the results in percentage.
I noticed that I get the same results when I plot the graph like this:
asPercent(stats.app01.cpu.total.user,sumSeries(stats.app01.cpu.total.*))
My problem with this is that I noticed that the curve is constantly growing - by tiny little fraction but it is growing - which I can't really make much sense of why. In fact it should be fairly flat and dropping and growing depending on the CPU usage at the time when the sample was taken. I would certainly NOT expect a growing trend. But I might missing something hence I'm turning here for some help.
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.