[mrtg] Perl external command ?!!

BALLO Ismaël iballo at afribone.net.ml
Tue Dec 3 13:11:53 MET 2002


I use a perl external command which works well when calling from the command
line :
Target[bmpcmali_error]: `/usr/bin/perl bm_rssi_error.pl bmpcmali`
but which returns errors when called from cfg file (by crontab) :

2002-12-03 12:00:02 -- WARNING: Could not get any data from external command
'/usr/bin/perl bm_rssi_error.pl bmcpssante'
Maybe the external command did not even start. (Illegal seek)

I don't understand why.
Permissions are correct. All being executable by root.

Is it maybe the argument ?

Here is the perl script bm_rssi_error.pl :

use Math::Round qw(round);
my $rssi;my $ret;my $tr;my $error_rate;
$rssi=`snmpget $ARGV[0] public .`;
$rssi=~/"(\d*)"|(\d*)$/;if ($1 ne "") {$rssi=$1;} else { $rssi=$2; }
$ret=`snmpget $ARGV[0] public .`;
$ret =~/(\d*)$/;$ret=$1;
$tr=`snmpget $ARGV[0] public .`;
$tr =~/(\d*)$/; $tr=$1;
print $rssi."\n";
print $error_rate."\n";

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
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list