From owner-freebsd-stable Wed Apr 17 15: 7:59 2002 Delivered-To: freebsd-stable@freebsd.org Received: from good.gulp.org (mail.gulp.org [204.245.54.140]) by hub.freebsd.org (Postfix) with ESMTP id 388A437B404 for ; Wed, 17 Apr 2002 15:07:54 -0700 (PDT) Received: (from atom@localhost) by good.gulp.org (8.11.6/8.11.6) id g3HM7mi91810 for freebsd-stable@freebsd.org; Wed, 17 Apr 2002 15:07:48 -0700 (MST) (envelope-from aToM@pobox.com) X-Authentication-Warning: good.gulp.org: atom set sender to aToM@pobox.com using -f Date: Wed, 17 Apr 2002 15:07:48 -0700 From: Steve Carter To: freebsd-stable@freebsd.org Subject: FreeBSD perl/warnings.pm Message-ID: <20020417150748.R32334@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Originally send to ports and bugs but was told freebsd-stable would be a better place. === I was playing w/ mrtg today ... basically trying to add a second instance for some remote systems I am monitoring. Not wanting to goof with my current config file I created another. I broke the rules and looked at the documentation; there is an option to have mrtg log to a file: $ mrtg yl.mrtg.cfg --logging yl.mrtg.log So I ran it and get this: $ cat yl.mrtg.log 2002-04-16 16:45:01 -- Started mrtg 2002-04-16 16:45:01 -- Can't locate warnings.pm in @INC (@INC contains: /usr/local/bin/../lib/mrtg2 /usr/local/bin /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at (eval 6) line 1. 2002-04-16 16:45:01 -- Callback called exit at /usr/local/bin/mrtg line 1. 2002-04-16 16:45:01 -- END failed--cleanup aborted at /usr/local/bin/mrtg line 1. It seems like the warnings.pm module is missing from FreeBSD default perl (as in /usr/bin/perl). I installed a later version of perl (resides in /usr/local/bin) on my machine: $ locate warnings.pm /usr/local/lib/perl5/5.6.1/warnings.pm so I copied /usr/local/bin/mrtg and /usr/local/bin/rateup (because mrtg uses $PWD or similar to find rateup) to $HOME/bin and changed it so that it uses /usr/local/bin/perl rather than /usr/bin/perl then tried again: $ pwd /usr/local/www/mrtg $ ls y* yl.mrtg.cfg $ ~/bin/mrtg yl.mrtg.cfg --logging yl.mrtg.log Rateup WARNING: /home/scarter/bin/rateup could not read the primary log file for xxx.xxx.org_yyy.yyy.yyy.11 Rateup WARNING: /home/scarter/bin/rateup The backup log file for xxx.xxx.org_yyy.yyy.yyy.11 was invalid as well Rateup WARNING: /home/scarter/bin/rateup Can't remove xxx.xxx.org_yyy.yyy.yyy.11.old updating log file Rateup WARNING: /home/scarter/bin/rateup Can't rename xxx.xxx.org_yyy.yyy.yyy.11.log to yellowlorry.gulp.org_140.99.102.11.old updating log file One can ignore these WARNING (heheh) messages because it's the 1st time the mrtg data and png files are accessed. Voila, everything worked correctly: $ ls y* xxx.xxx.org_yyy.yyy.yyy.11-day.png xxx.xxx.org_yyy.yyy.yyy.11-month.png xxx.xxx.org_yyy.yyy.yyy.11-week.png xxx.xxx.org_yyy.yyy.yyy.11-year.png xxx.xxx.org_yyy.yyy.yyy.11.html xxx.xxx.org_yyy.yyy.yyy.11.log yl.mrtg.cfg yl.mrtg.log yl.mrtg.ok Is something wrong here? -Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message