mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
docker_cpu: fix warnings when docker ps has empty list
This commit is contained in:
parent
0853d409f3
commit
260c8c8ff4
1 changed files with 2 additions and 2 deletions
|
@ -86,9 +86,9 @@ for my $i (1 .. $#containers)
|
|||
if (defined $ARGV[0] and $ARGV[0] eq "config")
|
||||
{
|
||||
my $nanoSecondsInSecond=1000000000;
|
||||
my $graphlimit = $result[0]{'ncpu'};
|
||||
my $graphlimit = 1;
|
||||
foreach(@result){
|
||||
if ($$_{'ncpu'} > $graphlimit){
|
||||
if ($$_{'ncpu'} || 1 > $graphlimit){
|
||||
$graphlimit = $$_{'ncpu'};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue