[mrtg] HELP! I should really get this, but I'm stumped . . .

Phil Ritzenthaler phil at minnie.cgrg.ohio-state.edu
Tue Apr 18 19:52:04 MEST 2000


Background
==========

System	- Sun Enterprise 250
OS	- Solaris 2.6
Switch	- Cisco WS-C2924M-XL
	- 'guest' and 'public' enabled RO

Thoroughly frustrated! . . .

I used cfgmaker (and then cfgmaker.cisco just to be sure I didn't screw
something up) to make the mrtg.cfg file.  The lines:
WorkDir:        /mnt/mrtg
WriteExpires:   Yes
----------

are in there.  It looks like it connected with the switch when the
cfgmaker.cisco ran because there is information in the mrtg.cfg file that can
only have been garnered from the switch.  When I initially run mrtg, it appears
to be connecting with the switch (/mnt/mrtg/switch.cgrg.ohio-state.edu.html): 

The statistics were last updated <B>Tuesday, 18 April 2000 at 13:16 </B>,<BR>
at which time <B>'switch.cgrg.ohio-state.edu'</B> had been  up for <B>26 days,
21:40:23 
------------

However, the program then just hangs.  Showing my lack pf perl knowledge, I
have tried to set ($main::DEBUG=5;) and use the debugger to trace where it is
occuring:   /bin/sh PERLDB_OPTS="N f A L=mrtg.debug" perl -d mrtg mrtg.cfg

and I have found:

getcurrent: rcfg target router switch.cgrg.ohio-state.edu.2 = $$target{'2:guest at switch.cgrg.ohio-state.edu'}{$mode}
inlast 824270841 outlast 2921995445 uptime 26 days, 21:36:36 name switch.cgrg.ohio-state.edu.cgrg.ohio-state.edu time 956077931
writegraphics: inlast 824270841 outlast 2921995445
EXEC: ./rateup /mnt/mrtg/ switch.cgrg.ohio-state.edu.2 956077931 -Z u 824270841 2921995445 1250000 c #00cc00 #0000ff #006600 #ff00ff k 1000 i switch.cgrg.ohio-state.edu.2-day.png -1250000 -1250000 400 100 1 1 0 300 0 4 1
^CBailout after SIG INT
        main::__ANON__(956078166, 'INT') called at mrtg line 1184
        main::writegraphics('switch.cgrg.ohio-state.edu.2', 'HASH(0x40d7ec)','HASH(0x40d7d4)', 825399928, 2923531427, 956078162) called at mrtg line 176
        main::main called at mrtg line 108

============================================================

And within the debug log:

  1107:       ($$rcfg{'suppress'}{$router} !~/m/)) {
  1117:   if (((not -e "$$cfg{'workdir'}${main::SL}$$rcfg{'directory'}{$router}${router}-year.png") ||
  1118:        (( -M "$$cfg{'workdir'}${main::SL}$$rcfg{'directory'}{$router}${router}-year.png") + $SAGE  >= 1)) &&
  1119:       ($$rcfg{'suppress'}{$router} !~/y/)) {
  1129:   print "EXEC: ",(join " ", @exec),"n" if $main::DEBUG;
  1134:   if ($main::OS eq 'VMS' || $main::OS eq 'NT') {
  1137:     open (RATEUP,"-|") ||  exec @exec;
  1148:   if (open (HTML,"<$$cfg{'workdir'}${main::SL}$$rcfg{'directory'}{$router}$router.html")) {
  1183:   foreach $period (@mxvls) {
  1184:     chomp($res = <RATEUP>);

=============================================================

So it looks like it was at line 1184 executing:
rateup /mnt/mrtg/ switch.cgrg.ohio-state.edu.2 956077931 -Z u 824270841 2921995445 1250000 c #00cc00 #0000ff #006600 #ff00ff k 1000 i switch.cgrg.ohio-state.edu.2-day.png -1250000 -1250000 400 100 1 1 0 300 0 4 1

So, I thought I'd try to run this alone and found:
./rateup /mnt/mrtg/ spider01.cgrg.ohio-state.edu.2 956077931 -Z u 824270841 2921995445 1250000 c #00cc00 #0000ff #006600 #ff00ff k 1000 i switch.cgrg.ohio-state.edu.2-day.png -1250000 -1250000 400 100 1 1 0 300 0 4 1
11200
13934
10792
13428
11051
13542

===============================================================

And therein lies the extent of my limited knowledge of perl.

The perlscript is (I think) dying on the 'rateup' command.  It executes other
'rateup' commands?  Why this one?  

HELP!!

Thanks . . .

-- 
Phil Ritzenthaler	  Sr. Systems Administrator,  OSU USENIX Rep.
ACCAD			  THE Ohio State University
phil at mane.cgrg.ohio-state.edu  (voice) 614-292-3416  (fax) 614-292-7776
DoD #1716  GWRRA #106041  http://www.cgrg.ohio-state.edu/~phil

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org



More information about the mrtg mailing list