[mrtg] Suppressing command-line errors, using perl scripts

Spencer B. Torene sbtorene at pbs.org
Fri Jan 20 17:53:46 MET 2006


Hi all,
 

I just got into using Perl scripts on remote servers and MRTG.  One
remote script, which uses this command-line command:

 

"netstat -a -n | grep -E "^(tcp)"| cut -c 68-|sort|uniq -c | sort -n |
grep TIME_WAIT"

 

Is causing a bunch of messages to be sent to the MRTG server that look
like this:

 

------------------------------------------------

...

...

Subject: Cron <user at server> /etc/mrtg/all-ip

X-Cron-Env: <SHELL=/bin/sh>

X-Cron-Env: <HOME=/home/user>

X-Cron-Env: <PATH=/usr/bin:/bin>

X-Cron-Env: <LOGNAME=user>

 

warning, got bogus tcp line.

warning, got bogus tcp line.

warning, got bogus tcp line.

---------------------------------------------

 

 

I know these warnings are returned by the remote server's command shell,
and not directly caused by the Perl script, nor actually passed as one
of the 4 values (In, Out, Host, Uptime) to the snmp collector, so is
there a way of suppressing these warnings?  Is it done within the Perl
script, or within MRTG?

 

 

Thanks a ton!

Spencer



_________________________________________________________________

AFRICAN AMERICAN LIVES
Join nine African Americans on an extraordinary journey to discover their past.
Wednesday, February 1st, 9/8C only on PBS
pbs.org/africanamericanlives
_________________________________________________________________

This email may contain material that is confidential or proprietary to PBS and is intended solely for use by the intended recipient.  Any review, reliance or distribution of such material by others, or forwarding of such material without express permission, is strictly prohibited.  If you are not the intended recipient, please notify the sender and destroy all copies.
_________________________________________________________________

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



More information about the mrtg mailing list