I wrote a script that polls for used ips in a dhcp scope and when run from a command line, returns back the correct number, say 218. When I run it thru cacti, however, it will sometimes return the number in decimal form - 218.01. What setting do I need to change in order for cacti to get rid of the .01?
Thanx
refining output
Moderators: Developers, Moderators
More info
Here is the script:
#!/usr/bin/perl
$alive = `/bin/fping -g 198.214.233.30 198.214.233.250 > /tmp/233_dhcp.log 2>&1`;
$alive = `/bin/grep -c 'alive' /tmp/233_dhcp.log > /tmp/233alive`;
open (INPUT, "</tmp/233alive")
or die "couldn't open file\n";
while (<INPUT>) {
chomp;
print "$_\n";}
works fine from cmd line, but returns odd numbers in graph
using gauge option, perhaps absolute?
#!/usr/bin/perl
$alive = `/bin/fping -g 198.214.233.30 198.214.233.250 > /tmp/233_dhcp.log 2>&1`;
$alive = `/bin/grep -c 'alive' /tmp/233_dhcp.log > /tmp/233alive`;
open (INPUT, "</tmp/233alive")
or die "couldn't open file\n";
while (<INPUT>) {
chomp;
print "$_\n";}
works fine from cmd line, but returns odd numbers in graph
using gauge option, perhaps absolute?
Who is online
Users browsing this forum: No registered users and 2 guests