I
inetquestion
For the program below why are all 4 attributes not getting filled in.
The data seems to be coming across per the Debug statement...
btw - I am running this on solaris 9. The problem seems to be related
to the whitespace at the beginning of the line, but I thought the
regex should account for it...
-Inet
#!/usr/bin/perl
chomp($CPU=`iostat -c 1 2 | tail -1`);
($usrcpu,$syscpu,$wiocpu,$idlecpu) = split(/\s+/,$CPU);
print "DEBUG: $CPU\n";
print "usrcpu: $usrcpu\n";
print "syscpu: $syscpu\n";
print "wiocpu: $wiocpu\n";
print "idlecpu: $idlecpu\n";
The data seems to be coming across per the Debug statement...
btw - I am running this on solaris 9. The problem seems to be related
to the whitespace at the beginning of the line, but I thought the
regex should account for it...
-Inet
#!/usr/bin/perl
chomp($CPU=`iostat -c 1 2 | tail -1`);
($usrcpu,$syscpu,$wiocpu,$idlecpu) = split(/\s+/,$CPU);
print "DEBUG: $CPU\n";
print "usrcpu: $usrcpu\n";
print "syscpu: $syscpu\n";
print "wiocpu: $wiocpu\n";
print "idlecpu: $idlecpu\n";