I am getting going with Cacti on Windows 2000 IIS5 (Iknow...Iknow ...)
I have got the program working with some help but the graphs are not plotting any info. Right now I am working with a basic ping test.
I noticed that using the SHOW OUTPUT command in the Cron Printout screen would not show anything for my test.
Iran the command line listed in the Cron Printout screen from a dos prompt and recieved a grep error.
I got a copy of grep for windows and am now getting an awk error.
I got a copy of awk for windows and am now recieveing this error:
C:\Documents and Settings\Administrator>perl c:/inetpub/wwwroot/cacti/scripts/ping.pl 4 10.0.0.254
awk: cmd. line:1: '{print
awk: cmd. line:1: ^ Invalid char ''' in expression
awk: cmd. line:1: '{print
awk: cmd. line:1: ^ Invalid char ''' in expression
Clues would be greatly appreciated
Answers would be highly regarded.
Thanks,
Tom
grep and awk for windows
Moderators: Developers, Moderators
I recommend using a perl.pl script that does not require awk. Newer cacti releases come with this script:
Keep in mind that this will not work unless you either:
1) Modify the ping syntax so it works with the Windows 2000 ping.
2) Get a copy of the Unix ping for windows.
-Ian
Code: Select all
#!/usr/bin/perl
$ping = `ping -c $ARGV[0] $ARGV[1] -w 1 | grep icmp_seq`;
$ping =~ s/(.*time=)(.*) (ms|usec)//;
print $2;
1) Modify the ping syntax so it works with the Windows 2000 ping.
2) Get a copy of the Unix ping for windows.
-Ian
Who is online
Users browsing this forum: No registered users and 3 guests