mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-03-08 08:58:43 +03:00
sort module usage + some newlines for readabilty
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1f929ade0a
commit
f27d5e6b7a
@ -2,15 +2,16 @@ package PVE::Network;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use PVE::Tools qw(run_command lock_file);
|
||||
use PVE::ProcFSTools;
|
||||
|
||||
use PVE::INotify;
|
||||
use PVE::ProcFSTools;
|
||||
use PVE::Tools qw(run_command lock_file);
|
||||
|
||||
use File::Basename;
|
||||
use IO::Socket::IP;
|
||||
use Socket qw(NI_NUMERICHOST NI_NUMERICSERV);
|
||||
use POSIX qw(ECONNREFUSED);
|
||||
|
||||
use Net::IP;
|
||||
use POSIX qw(ECONNREFUSED);
|
||||
use Socket qw(NI_NUMERICHOST NI_NUMERICSERV);
|
||||
|
||||
# host network related utility functions
|
||||
|
||||
|
@ -147,9 +147,11 @@ sub read_proc_stat {
|
||||
my $useddiff = $res->{used} - $last_proc_stat->{used};
|
||||
$useddiff = $diff if $useddiff > $diff;
|
||||
$res->{cpu} = $useddiff/$diff;
|
||||
|
||||
my $waitdiff = $res->{iowait} - $last_proc_stat->{iowait};
|
||||
$waitdiff = $diff if $waitdiff > $diff;
|
||||
$res->{wait} = $waitdiff/$diff;
|
||||
|
||||
$last_proc_stat = $res;
|
||||
} else {
|
||||
$res->{cpu} = $last_proc_stat->{cpu};
|
||||
|
Loading…
x
Reference in New Issue
Block a user