[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
[snips-users] bug in snmpmon-collector
|
That statement was in wrong place, so that dtime was 1 sec instead of
300, thus making all relative data wrong $prevtime{$d} = $testtime; diff -c snips-1.2beta2/perl-monitors/snmpmon-collector bin/snmpmon-collector *** snips-1.2beta2/perl-monitors/snmpmon-collector Wed Jan 30 00:31:27 2002 --- bin/snmpmon-collector Tue Aug 20 12:54:34 2002 *************** *** 835,844 **** get_snmpdata($dev); ($debug>2) && print STDERR "old prevtime{$d}, testtime: $prevtime{$d}, $testtime\n"; - $prevtime{$d} = $testtime; # ASSERT: prevtime{d} contains time of - # last poll $testtime = int((time + $testtime) / 2); # take average - ($debug>2) && print STDERR "new prevtime{$d}, testtime: $prevtime{$d}, $testtime\n"; # process each type of variable for the device foreach my $typ (@devicetypes) { --- 835,841 ---- *************** *** 848,853 **** --- 845,854 ---- } close (DFILE); rename($tfile, $dfile) || die "Cannot rename $tfile to $dfile $!"; + + $prevtime{$d} = $testtime; # ASSERT: prevtime{d} contains time of + # last poll + ($debug>2) && print STDERR "new prevtime{$d}, testtime: $prevtime{$d}, $testtime\n"; } # foreach $device $debug && print STDERR "Sleeping for $sleeptime...\n"; -- Dmitry Sazonov x4168 UNIX sysadmin, AAMC |