CMD.PHP and RRA Fetch output not the same

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
dboyd13
Posts: 6
Joined: Thu Mar 04, 2004 2:41 am

CMD.PHP and RRA Fetch output not the same

Post by dboyd13 »

Hi all,

Could anyone please shed some light on this for me.....

Here is an extract from running the CMD.PHP command (php cmd.php):

MULTI command: perl /var/www/html/cacti/scripts/UpInterfaces.pl <Edited out> <Edited out>, output: used:12 total:48
MULTI expansion: found fieldid: 41, found rrdname: used, value: 12
MULTI expansion: found fieldid: 43, found rrdname: total, value: 48

update /var/www/html/cacti/rra/c24_presw06_used_55.rrd --template used:total N:12:48

So as you can see my script is correctly outputing 12 & 48, then it seems to be written to c24_presw06_used_55.rrd correcly...

But if I to a fetch on the above rrd file... I don't get the above values...

1078381800: nan nan
1078382100: 0.0000000000e+00 0.0000000000e+00
1078382400: 0.0000000000e+00 0.0000000000e+00
1078382700: 0.0000000000e+00 0.0000000000e+00
1078383000: 0.0000000000e+00 0.0000000000e+00
1078383300: 0.0000000000e+00 0.0000000000e+00
1078383600: 0.0000000000e+00 0.0000000000e+00
1078383900: 0.0000000000e+00 0.0000000000e+00
1078384200: 0.0000000000e+00 0.0000000000e+00
1078384500: 0.0000000000e+00 0.0000000000e+00
1078384800: 0.0000000000e+00 0.0000000000e+00
1078385100: 0.0000000000e+00 0.0000000000e+00
1078385400: 0.0000000000e+00 0.0000000000e+00
1078385700: 0.0000000000e+00 0.0000000000e+00
1078386000: 0.0000000000e+00 0.0000000000e+00
1078386300: 0.0000000000e+00 0.0000000000e+00

Also, due to the RRD file contents being incorrect, the Graph output is also incorrect.

Please help.

Thanks.
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Can you do rrdtool dump on your rrd file and tell us min and max value for used and total (you should find them somewhere in file header). Also what are data source types?

- Piotr
dboyd13
Posts: 6
Joined: Thu Mar 04, 2004 2:41 am

Post by dboyd13 »

Here is an extract of output from RRDTOOL Dump:


<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1078722646 </lastupdate> <!-- 2004-03-08 07:10:46 SAST -->

<ds>
<name> used </name>
<type> COUNTER </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 5.0000000000e+02 </max>

<!-- PDP Status -->
<last_ds> 12 </last_ds>
<value> 1.5384615385e-01 </value>
<unknown_sec> 0 </unknown_sec>
</ds>

<ds>
<name> total </name>
<type> COUNTER </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 5.0000000000e+02 </max>

<!-- PDP Status -->
<last_ds> 48 </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Your both data source types are set to COUNTER. This means that the values stored in rrd files are rates (curr_value - prev_value)/300. If your values are always the same like 48 all the time this means you will have 0 stored for this data source. You may consider setting your data sources to GAUGE - in this case delivered values are stored into rrd file.

- Piotr
dboyd13
Posts: 6
Joined: Thu Mar 04, 2004 2:41 am

Post by dboyd13 »

Thanks problem solved!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests