enhance docker container

This commit is contained in:
garnier-quentin 2019-06-28 16:04:13 +02:00
parent e3f8b9725e
commit 1a79ba80ae
1 changed files with 2 additions and 1 deletions

View File

@ -250,7 +250,8 @@ sub manage_selection {
write_io => $write_io,
cpu_total_usage => $result->{$container_id}->{Stats}->{cpu_stats}->{cpu_usage}->{total_usage},
cpu_system_usage => $result->{$container_id}->{Stats}->{cpu_stats}->{system_cpu_usage},
cpu_number => scalar(@{$result->{$container_id}->{Stats}->{cpu_stats}->{cpu_usage}->{percpu_usage}}),
cpu_number => defined($result->{$container_id}->{Stats}->{cpu_stats}->{cpu_usage}->{percpu_usage}) ?
scalar(@{$result->{$container_id}->{Stats}->{cpu_stats}->{cpu_usage}->{percpu_usage}}) : 1,
memory_usage => $result->{$container_id}->{Stats}->{memory_stats}->{usage},
memory_total => $result->{$container_id}->{Stats}->{memory_stats}->{limit},
};