I
inetquestion
I can't seem to get rid of the error message if sar doesn't exist in
the path. The redirection of stderr from within the backticks isn't
working via perl. Is there another way to allieviate these errors from
showing up in the console? Any suggestions on how to get cpuidle which
will work on unix or windows?
$CpuAvg=`sar -u 15 2>/dev/null | tail -1 | awk '{print \$5}'`;
if ( $CpuAvg=~/[0-9]*/ ) {
$CpuAvg=`vmstat 15 2 | tail -1 | awk '{print \$22}'`;
}
chomp($CpuAvg);
-Inet
the path. The redirection of stderr from within the backticks isn't
working via perl. Is there another way to allieviate these errors from
showing up in the console? Any suggestions on how to get cpuidle which
will work on unix or windows?
$CpuAvg=`sar -u 15 2>/dev/null | tail -1 | awk '{print \$5}'`;
if ( $CpuAvg=~/[0-9]*/ ) {
$CpuAvg=`vmstat 15 2 | tail -1 | awk '{print \$22}'`;
}
chomp($CpuAvg);
-Inet