fixed messages of 'use of uninitialized values' in 'proc' graph on FreeBSD systems

This commit is contained in:
Jordi Sanfeliu 2014-01-17 12:35:30 +01:00
parent f29d94138d
commit 4a1ec4f598
1 changed files with 2 additions and 1 deletions

View File

@ -180,7 +180,8 @@ sub proc_update {
my @data = split(' ', <IN>);
close(IN);
chomp($ncpu);
for($n = 0; $n < $proc->{max}; $n++) {
$ncpu = min($ncpu, $proc->{max});
for($n = 0; $n < $ncpu; $n++) {
$str = "cpu" . $n;
$from = $n * 5;
$to = $from + 4;