mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix to skip CPU IO in initial load
This commit is contained in:
@@ -655,9 +655,13 @@ return (\@cpu, \@fans);
|
||||
# blocks in and out
|
||||
sub get_cpu_io_usage
|
||||
{
|
||||
my $out,@lines,@w;
|
||||
my ($nodelay) = @_;
|
||||
my $interval;
|
||||
$interval = " 1 2"
|
||||
if (!$nodelay);
|
||||
my ($out, @lines, @w);
|
||||
if (&has_command("vmstat")) {
|
||||
$out = &backquote_command("vmstat 1 2 2>/dev/null");
|
||||
$out = &backquote_command("vmstat$interval 2>/dev/null");
|
||||
@lines = split(/\r?\n/, $out);
|
||||
@w = split(/\s+/, $lines[$#lines]);
|
||||
shift(@w) if ($w[0] eq '');
|
||||
|
||||
@@ -84,7 +84,7 @@ $info->{'drivetemps'} = \@drive if (@drive);
|
||||
# IO input and output
|
||||
if (defined(&proc::get_cpu_io_usage)) {
|
||||
my ($user, $kernel, $idle, $io, $vm, $bin, $bout) =
|
||||
&proc::get_cpu_io_usage();
|
||||
&proc::get_cpu_io_usage((&indexof('cpuio', @{$modskip}) > -1));
|
||||
if (defined($bin)) {
|
||||
$info->{'io'} = [ $bin, $bout ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user