Help with Graphing
Moderators: Developers, Moderators
Help with Graphing
I'm new to Cacti and I was trying to run a test perl script that was just this:
open(READINGS, "c:\Inetpub\wwwroot\cacti\read.txt");
read(READINGS, $data, 4);
chomp $data;
print $data;
The text file just includes a 3-digit number with a newline character
Ok, so I ran cmd.php to see if it can open and run the script and it works. It outputs:
command: perl "c:/Inetpub/wwwroot/cacti/scripts/script.pl", output: 740
update C:\Inetpub\wwwroot\cacti/rra/light_data_13.rrd --template light_data N:740
time: 0
...etc...
So it can open the file.
When I check the graph, it does not get created...I just get a broken link. I turn on the debug option in cacti and it says:
Warning: popen(c:/Inetpub/wwwroot/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=-86400 --end=-60 --title="Light Readings" --base=1024 --height=300 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="Value" DEF:a="c\:\inetpub\wwwroot\cacti/rra/light_data_13.rrd":light_data:AVERAGE LINE2:a#0000FF:"" GPRINTLAST:"%8.2lf %s" 2>&1,r): No error in c:\inetpub\wwwroot\cacti\lib\rrd.php on line 58
Warning: fgets(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\cacti\lib\rrd.php on line 72
Can anyone help me find out what is wrong and what I can do to fix it? I get the same error when I try the random2.pl script (random number generator) in the manual...
Any help would be greatly appreciated!
open(READINGS, "c:\Inetpub\wwwroot\cacti\read.txt");
read(READINGS, $data, 4);
chomp $data;
print $data;
The text file just includes a 3-digit number with a newline character
Ok, so I ran cmd.php to see if it can open and run the script and it works. It outputs:
command: perl "c:/Inetpub/wwwroot/cacti/scripts/script.pl", output: 740
update C:\Inetpub\wwwroot\cacti/rra/light_data_13.rrd --template light_data N:740
time: 0
...etc...
So it can open the file.
When I check the graph, it does not get created...I just get a broken link. I turn on the debug option in cacti and it says:
Warning: popen(c:/Inetpub/wwwroot/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=-86400 --end=-60 --title="Light Readings" --base=1024 --height=300 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="Value" DEF:a="c\:\inetpub\wwwroot\cacti/rra/light_data_13.rrd":light_data:AVERAGE LINE2:a#0000FF:"" GPRINTLAST:"%8.2lf %s" 2>&1,r): No error in c:\inetpub\wwwroot\cacti\lib\rrd.php on line 58
Warning: fgets(): supplied argument is not a valid stream resource in c:\inetpub\wwwroot\cacti\lib\rrd.php on line 72
Can anyone help me find out what is wrong and what I can do to fix it? I get the same error when I try the random2.pl script (random number generator) in the manual...
Any help would be greatly appreciated!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Please state, OS, PHP, Cacti, MySQL, and NetSNMP versions. Thanks.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Which PHP version of 4? Run "c:\php\php.exe -v" and post results.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
What is your Cacti version. I believe that it is not 0.8.6x. I am not too familiar with earlier versions of Cacti. Should be released soon.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
the_ebl,
I recommend upgrading to 0.8.6a. It was released today. Backup your current database prior to the upgrade. To accomplish this, use the command below:
c:\mysql\bin\mysqldump -u=root -p cacti > cacti.backup.sql
TheWitness
I recommend upgrading to 0.8.6a. It was released today. Backup your current database prior to the upgrade. To accomplish this, use the command below:
c:\mysql\bin\mysqldump -u=root -p cacti > cacti.backup.sql
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest