*** /usr/people/kostas/mrtg-2.5.1/mrtg.orig Wed Feb 11 14:10:45 1998 --- /usr/people/kostas/mrtg-bin/mrtg Mon Feb 23 15:18:17 1998 *************** *** 1,4 **** ! #!/usr/local/bin/perl5.002 # -*- mode: Perl -*- BEGIN{ $main::OS = 'UNIX'; --- 1,4 ---- ! #!/usr/local/bin/perl5.004 # -*- mode: Perl -*- BEGIN{ $main::OS = 'UNIX'; *************** *** 111,116 **** --- 111,139 ---- #frame relay stuff ... see the docs for explanations 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9', 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7', + # squid mib + 'cacheClientHttpRequests' => '1.3.6.1.3.25.17.3.2.1.1', + 'cacheHttpHits' => '1.3.6.1.3.25.17.3.2.1.2', + 'cacheHttpErrors' => '1.3.6.1.3.25.17.3.2.1.3', + 'cacheICPpktsSent' => '1.3.6.1.3.25.17.3.2.1.4', + 'cacheICPpktsRecv' => '1.3.6.1.3.25.17.3.2.1.5', + 'cacheICPkbSent' => '1.3.6.1.3.25.17.3.2.1.6', + 'cacheICPkbRecv' => '1.3.6.1.3.25.17.3.2.1.7', + 'cacheHttpInKb' => '1.3.6.1.3.25.17.3.2.1.8', + 'cacheHttpOutKb' => '1.3.6.1.3.25.17.3.2.1.9', + 'cacheCurrentSwapSize' => '1.3.6.1.3.25.17.3.2.1.10', + 'cacheHttpMedianSvcFiveMin' => '1.3.6.1.3.25.17.3.2.1.11', + 'cacheICPMedianSvcFiveMin' => '1.3.6.1.3.25.17.3.2.1.13', + 'cacheDNSMedianSvcFiveMin' => '1.3.6.1.3.25.17.3.2.1.15', + 'cacheHttpMedianSvcHour' => '1.3.6.1.3.25.17.3.2.1.12', + 'cacheICPMedianSvcHour' => '1.3.6.1.3.25.17.3.2.1.14', + 'cacheDNSMedianSvcHour' => '1.3.6.1.3.25.17.3.2.1.16', + 'cacheNumObjCount' => '1.3.6.1.3.25.17.3.1.7', + 'cacheCpuUsage' => '1.3.6.1.3.25.17.3.1.5', + 'cacheMemUsage' => '1.3.6.1.3.25.17.3.1.4', + 'cacheSysPageFaults' => '1.3.6.1.3.25.17.3.1.1', + 'cacheTCPconnections' => '1.3.6.1.3.25.17.4.4', + 'cacheUDPconnections' => '1.3.6.1.3.25.17.4.5' ); *************** *** 416,422 **** my ($rou, $confname, $one_option); my %target; my $error="no"; ! my(@known_options) = qw(growright bits noinfo absolute gauge nopercent integer); if (! $$cfg{workdir}) { warn ("\nERROR: \"WorkDir\" not specified\n"); $error = "yes"; --- 439,445 ---- my ($rou, $confname, $one_option); my %target; my $error="no"; ! my(@known_options) = qw(growright bits noinfo absolute gauge nopercent integer perhour perminute); if (! $$cfg{workdir}) { warn ("\nERROR: \"WorkDir\" not specified\n"); $error = "yes"; *************** *** 668,673 **** --- 691,699 ---- my $up_abs="u"; $up_abs='a' if $$rcfg{'options'}{'absolute'}{$router}; $up_abs='g' if $$rcfg{'options'}{'gauge'}{$router}; + $up_abs='h' if $$rcfg{'options'}{'hourly'}{$router}; + $up_abs='m' if $$rcfg{'options'}{'perminute'}{$router}; + ((($main::OS eq 'NT') && (-e "$main::binpath${main::SL}rateup.exe")) || (-x "$main::binpath${main::SL}rateup")) || die "Can't Execute '$main::binpath${main::SL}rateup'\n"; *************** *** 1040,1069 **** "; print HTML " ! ! ! " if $InCo; print HTML " ! ! ! " if $OutCo; --- 1066,1095 ----
Max$InCo ".&fmi($$maxin{$peri}{$router}, $router, $rcfg)." Average$InCo ".&fmi($$avin{$peri}{$router}, $router, $rcfg)." Current$InCo ".&fmi($$cuin{$peri}{$router}, $router, $rcfg)."
Max$OutCo ".&fmi($$maxout{$peri}{$router}, $router, $rcfg)." Average$OutCo ".&fmi($$avout{$peri}{$router}, $router, $rcfg)." Current$OutCo ".&fmi($$cuout{$peri}{$router}, $router, $rcfg)."
"; print HTML " ! ! ! " if $InCo; print HTML " ! ! ! " if $OutCo; *************** *** 1408,1414 **** } srand(); my $session; ! $session = SNMP_Session->open($host,$community,161); if (! defined($session)) { warn "SNMPGET Problem for $community\@$host\n"; return (-1,-1); --- 1434,1440 ---- } srand(); my $session; ! $session = SNMP_Session->open($host,$community,3401); if (! defined($session)) { warn "SNMPGET Problem for $community\@$host\n"; return (-1,-1); *** /usr/people/kostas/mrtg-2.5.1/rateup.c.orig Fri Oct 24 06:30:12 1997 --- /usr/people/kostas/mrtg-2.5.1/rateup.c Mon Feb 23 14:38:11 1998 *************** *** 1,4 **** --- 1,8 ---- /* + + kostas@nlanr.net: patched , see : + http://www.ee.ethz.ch/~slist/mrtg/msg02203.html + $Id: rateup.c,v 2.10 1997/10/24 13:30:06 oetiker Exp oetiker $ $Log: rateup.c,v $ Revision 2.10 1997/10/24 13:30:06 oetiker *************** *** 819,825 **** outrate = history[0].out; } else { /* gauge and absolute */ ! if (absupdate != 0) { strcpy(last.in,"0"); strcpy(last.out,"0"); } --- 823,829 ---- outrate = history[0].out; } else { /* gauge and absolute */ ! if ((absupdate != 0) && (absupdate !=3) &&(absupdate!=4)) { strcpy(last.in,"0"); strcpy(last.out,"0"); } *************** *** 827,832 **** --- 831,842 ---- if (absupdate == 2) { inrate = diff(in,last.in); outrate = diff(out,last.out); + } else if (absupdate == 3) { + inrate=diff(in,last.in)*(3600.0/(period*1.0)); + outrate=diff(out,last.out)*(3600.0/(period*1.0)); + } else if (absupdate == 4) { + inrate=diff(in,last.in)*(60.0/(period*1.0)); + outrate=diff(out,last.out)*(60.0/(period*1.0)); } else { inrate = diff(in,last.in) / period; outrate = diff(out,last.out) / period; *************** *** 839,845 **** last.time = now; /* what is this good for? */ /* gauge und absolute */ ! if (absupdate) { strcpy(last.in,"0"); strcpy(last.out,"0"); } else { --- 849,855 ---- last.time = now; /* what is this good for? */ /* gauge und absolute */ ! if ((absupdate !=0) && (absupdate != 3) && (absupdate != 4)) { strcpy(last.in,"0"); strcpy(last.out,"0"); } else { *************** *** 1096,1101 **** --- 1106,1119 ---- break; case 'a': /* Absolute Update file */ update(argv[argi+1],argv[argi+2],atol(argv[argi+3]),1); + used = 4; + break; + case 'h': + update(argv[argi+1],argv[argi+2],atol(argv[argi+3]),3); + used = 4; + break; + case 'm': + update(argv[argi+1],argv[argi+2],atol(argv[argi+3]),4); used = 4; break; case 'g': /* Gauge Update file */
Max $InCo ".&fmi($$maxin{$peri}{$router}, $router, $rcfg)." Average $InCo ".&fmi($$avin{$peri}{$router}, $router, $rcfg)." Current $InCo ".&fmi($$cuin{$peri}{$router}, $router, $rcfg)."
Max $OutCo ".&fmi($$maxout{$peri}{$router}, $router, $rcfg)." Average $OutCo ".&fmi($$avout{$peri}{$router}, $router, $rcfg)." Current $OutCo ".&fmi($$cuout{$peri}{$router}, $router, $rcfg)."