Hi,
Im new on php but im having some problems with the popen function, i have this code:
if($fp = popen("/usr/bin/rrdtool fetch $_name AVERAGE",'r')){
trim(fgets($fp, 4096));
print $line;
while(!feof($fp)){
print $line;
$line = trim(fgets($fp, 4096));
}
}else print "ERROR";
I get not result and no error, i get a blank html but if i put
if($fp = popen("/usr/bin/rrdtool fetch /var/www/cacti/rra/1/32.rrd AVERAGE",'r')){
And i write the value of $_name i get results on the web. Why if i pass the value in a variable i get no result.
There is no error in the values, i think is format conversion. Maybe $_name is not totally a string and can give problem?
Best Regards.
Problem with popen and rrdtool
Moderators: Developers, Moderators
Now im using the function of cacti called bandwidth_summation
bandwidth_summation($local_data_id, $start_time, $end_time, $rra_steps, $ds_steps)
When i called for a period of 1 day with rra_steps =1 ds_steps=300 works great but when i put a bigger period, for example 7 days the results are wrong.
THe result of the function isnt the same of the graphic
bandwidth_summation($local_data_id, $start_time, $end_time, $rra_steps, $ds_steps)
When i called for a period of 1 day with rra_steps =1 ds_steps=300 works great but when i put a bigger period, for example 7 days the results are wrong.
THe result of the function isnt the same of the graphic
Who is online
Users browsing this forum: No registered users and 0 guests