[mrtg] Re: the perl script generates crap characters ("88" Hex: 38 38 instea d of just 88)

Glenn Forbes Fleming Larratt glratt at rice.edu
Wed Apr 18 14:58:42 MEST 2001


Try this (the regular expression matches on a value in quotes followed by
"Hex:", and returns into $1 the value within the quotes):

$idsum = $split_values[19];
if($idsum =~ /\"(\d+)\"\s+Hex:/	 )
{ $idcpuout = $1; }
else
{ $idcpuout = $idsum; }
print "$idcpuout\n";

On Wed, 18 Apr 2001, Malmgren, Henrik wrote:

> 	$idsum = $split_values[19];
>         	$idcpuout = int($idsum);
>         	print "$idcpuout\n";

				Glenn Forbes Fleming Larratt
				Rice University Network Management
				glratt at rice.edu



--
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