remove the use of $bproc for pctcpu
This commit is contained in:
parent
f352e0733f
commit
aaa507fdeb
|
@ -185,21 +185,6 @@ sub colorize{
|
|||
my $field=$fields->[$fieldInt];
|
||||
|
||||
if (
|
||||
($^O =~ /bsd/) &&
|
||||
( $field =~ /pctcpu/ )
|
||||
){
|
||||
my $pctcpu=$bproc->{pctcpu};
|
||||
|
||||
if ( ! defined( $pctcpu ) ){
|
||||
$values{pctcpu}=0
|
||||
}else{
|
||||
my $fscale=`/sbin/sysctl -a kern.fscale`;
|
||||
$fscale=~s/^.*\: //;
|
||||
chomp($fscale);
|
||||
|
||||
$values{pctcpu}= 100 * ( $pctcpu / $fscale );
|
||||
}
|
||||
}elsif(
|
||||
($^O =~ /bsd/) &&
|
||||
( $field =~ /pctmem/ )
|
||||
){
|
||||
|
|
Loading…
Reference in New Issue