Graphing exact numbers ( but not integer ) - CPU Usage graph

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
sandroiv
Posts: 2
Joined: Fri Mar 09, 2012 10:38 am

Graphing exact numbers ( but not integer ) - CPU Usage graph

Post by sandroiv »

Hello cacti specialists, i need some help with a problem that i didn´t find a solution googling.

I made a script to get cpu agregation values from /proc/stat, calculate the percentage and return as following :

/opt/cacti/scripts/get_cpu_usage serverX
user_perc:0.64 nice_perc:0.07 syst_perc:0.27 idle_perc:97.46 iowa_perc:1.52 irq__perc:0.01 sirq_perc:0.03 steal_perc:0.00

Note that sum of all values is equal to 100 :

echo 0.64 + 0.07 + 0.27 + 97.46 + 1.52 + 0.01 + 0.03 + 0.00| bc
100.00

Since graph template has a mandatory base value of 1000 or 1024, cacti is multiplying my already correct values. I.E. Value 0.64 turns to 640.00

I tried GPRINT "Exact Numbers" but it is rounding the values.

This problem seems to be dumb, but i´m really having difficult to solve it. I´m wondering if i have to create a new GPRINT TYPE but don´t know a correct GPRINT Text to do it.

Thanks for your time
Regads
Sandro
sandroiv
Posts: 2
Joined: Fri Mar 09, 2012 10:38 am

Re: Graphing exact numbers ( but not integer ) - CPU Usage g

Post by sandroiv »

Just found the solution after more spend time searching...

http://forums.cacti.net/viewtopic.php?t=8168

Creating a GPRINT present named Real Value with GPRINT text %8.2lf

Just realized that GPRINT present named Load Average has this same value. After all i could just use load average... really not an intuitive name for it...

Sandro
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest