Help with Graphing

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
the_ebl
Posts: 5
Joined: Wed Sep 29, 2004 12:10 am

Help with Graphing

Post by the_ebl »

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:"" GPRINT:a:LAST:"%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!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please state, OS, PHP, Cacti, MySQL, and NetSNMP versions. Thanks.

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?
the_ebl
Posts: 5
Joined: Wed Sep 29, 2004 12:10 am

PHP Help

Post by the_ebl »

I'm using Windows XP with sp2 (but the problem was there before I installed it)

Also I'm using PHP 4 and mySQL and 4.0.18 and using IIS v5.1

I'm not going to use any SNMP features.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Which PHP version of 4? Run "c:\php\php.exe -v" and post results.

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?
the_ebl
Posts: 5
Joined: Wed Sep 29, 2004 12:10 am

Post by the_ebl »

Here's the version of PHP I was using:

PHP 4.3.8 (cgi-fcgi) (built: Jul 13 2004 17:36:43)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 :oops:
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?
the_ebl
Posts: 5
Joined: Wed Sep 29, 2004 12:10 am

Post by the_ebl »

It's 0.8.5a
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest