|
|
@ -67,10 +67,10 @@ if ($cluster){ |
|
|
|
|
|
|
|
|
|
|
|
my $guests = from_json(qx($pvesh get /cluster/resources --type=vm $pvesh_opt 2>/dev/null)); |
|
|
|
my $guests = from_json(qx($pvesh get /cluster/resources --type=vm $pvesh_opt 2>/dev/null)); |
|
|
|
foreach my $guest (@{$guests}){ |
|
|
|
foreach my $guest (@{$guests}){ |
|
|
|
$json->{network}->{in} += $guest->{netin}; |
|
|
|
$json->{network}->{in} += $guest->{netin} || 0; |
|
|
|
$json->{network}->{out} += $guest->{netout}; |
|
|
|
$json->{network}->{out} += $guest->{netout} || 0; |
|
|
|
$json->{disk}->{read} += $guest->{diskread}; |
|
|
|
$json->{disk}->{read} += $guest->{diskread} || 0; |
|
|
|
$json->{disk}->{write} += $guest->{diskwrite}; |
|
|
|
$json->{disk}->{write} += $guest->{diskwrite} || 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} elsif ($node){ |
|
|
|
} elsif ($node){ |
|
|
|
foreach my $item (qw(status version subscription)){ |
|
|
|
foreach my $item (qw(status version subscription)){ |
|
|
|