[Wellington-pm] Looking for an easier, clearer way to ...
Grant McLean
grant at mclean.net.nz
Thu Sep 2 20:58:09 CDT 2004
A local Perl newbie sent me the following message directly.
Let's show him what a helpful bunch of mongers we are ...
-- Original Message Follows --
I'm sure there must be an easier, clearer way to do this;
my $diskdescr =
`snmpwalk $hostname -c $communityname -Oqs -v1 extOutput`;
chomp $diskdescr;
# $diskdescr looks like this;
# extOutput.1
8,0,148646203,16523952,1112455874,132122251,2116450096:8,1,638055135,362646180,795647676,275408955,3348765608
# $diskdescr has extOutput.1 at the beginning, I need to drop that
my ($rubbish,$rest) = split ' ', $diskdescr;
my @diskioentries = split ':', $rest;
Suggestions welcome!
More information about the Wellington-pm
mailing list