[mrtg] Max4k user tracking problem

Rene van Dijk r.vandijk at accu.uu.nl
Mon Oct 4 20:21:41 MEST 1999


Hi,

I have a strange problem with MRTG rateup.. I am trying to measure the
online sessions on a Max4000 with analog modems installed.
If I run the script ./max4kusr the output is ok it shows the users currently
online and it shows "30" which i will later set to "0"

I found a example at: http://www2.discpro.org/solea/maxsession.mrtg
but I had to modified the original because the example only had one
output statement and the crontab log didn't liked it...

Here is the perl script its slightly modified.

=============================================================
#!/local/bin/perl
# MRTG plugin to graph the number of users.
# Leland Vandervort
# lelandv at innotts.net
##################################################
#

$allCurrentAnalogIncoming = ".1.3.6.1.4.1.529.11.5";
$allCurrentDigitalIncoming = ".1.3.6.1.4.1.529.11.7";
$allCurrentFRIncoming = ".1.3.6.1.4.1.529.11.9";
$community = "public";

$totalusers = 0;
$totalusers1 = 30;

foreach $host ('max4k at mydomain.com')
{
$temp1 = `snmpwalk -c $community $host $allCurrentAnalogIncoming`;
($dummy,$analog) = split(/ INTEGER: /, $temp1);
$temp1 = `snmpwalk -c $community $host $allCurrentDigitalIncoming`;
($dummy,$digital) = split(/ INTEGER: /, $temp1);
$temp1 = `snmpwalk -c $community $host $allCurrentFRIncoming`;
($dummy,$frame) = split(/ INTEGER: /, $temp1);

$totalusers = $analog + $digital + $frame;

}
print "$totalusers1\n$totalusers\n";
=============================================================

But if i check the generated log file only the first instance will show the
right number of users and the rest is set to zero.

937855200 30 0
937854900 30 0 30 0
937854600 30 0 30 0
937854300 30 0 30 0
937854000 30 0 30 0
937853700 30 0 30 0
937853400 30 0 30 0
937853100 2 0 30 2
937852800 0 0 0 0
937852500 0 0 0 0
937852200 0 0 0 0

I'm quite desperate about this problem.. the output from the perlscript is
fine but something is in its way and I can't figure out why.... I noticed
the online time will show up in the weekly graph.

max4kusr is called by (a test script (modified roundtrip script))
=============================================================
##################################################################

Title[maxtst]: Max users online test
PageTop[maxtst]: <H1>Max users online test</H1>

MaxBytes[maxtst]: 1000
AbsMax[maxtst]: 10000
Options[maxtst]: gauge
Target[maxtst]: `/usr/local/http/mrtg/mrtgbin/max4kusr`
YLegend[maxtst]: round trip time
ShortLegend[maxtst]: ms
Legend1[maxtst]: Maximum Round Trip Time in ms
Legend2[maxtst]: Minimum Round Trip Time in ms
Legend3[maxtst]: Maximal 5 Minute Maximum Round Trip Time in ms
Legend4[maxtst]: Maximal 5 Minute Minimum Round Trip Time in ms
LegendI[maxtst]: &nbsp;Max:
LegendO[maxtst]: &nbsp;Min:
WithPeak[maxtst]: ymwd
=============================================================

MRTG graphs can be found at:
http://newton.uu.nl/tr/cisco/maxtst.html

Running MRTG version 2.7.5 on solaris.


-----------------------------------------------------------------
Rene van Dijk                      | Phone: +31-(0)30 XXXxxxx
Network Engineer                   | Fax:   +31-(0)30 XXXxxxx
Solisnet Netwerkbeheer             | r.vandijk at accu.uu.nl
P.O.Box 80011 3508 TA  Utrecht     | ----------------------------
the Netherlands                    | http://www.net.uu.nl
--Just some wise words-------------------------------------------
We all know bosses don't know or think about IT, they only listen
to seminar speakers with a tie that is more expensive then theirs.
Ergo: buy an expensive tie and your boss listens to your advice.
-----------------------------------------------------------------

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list