diff --git a/cloud/docker/cadvisor/custom/api.pm b/cloud/docker/cadvisor/custom/api.pm index 62c0a51ed..98c1aa271 100644 --- a/cloud/docker/cadvisor/custom/api.pm +++ b/cloud/docker/cadvisor/custom/api.pm @@ -47,10 +47,10 @@ sub new { "hostname:s@" => { name => 'hostname' }, "port:s" => { name => 'port', default => 8080 }, "proto:s" => { name => 'proto', default => 'http' }, - "credentials" => { name => 'credentials' }, - "username:s" => { name => 'username' }, - "password:s" => { name => 'password' }, - "proxyurl:s" => { name => 'proxyurl' }, + "credentials" => { name => 'credentials' }, + "username:s" => { name => 'username' }, + "password:s" => { name => 'password' }, + "proxyurl:s" => { name => 'proxyurl' }, "proxypac:s" => { name => 'proxypac' }, "timeout:s" => { name => 'timeout', default => 10 }, "ssl:s" => { name => 'ssl' }, @@ -60,7 +60,7 @@ sub new { "cert-pwd:s" => { name => 'cert_pwd' }, "cert-pkcs12" => { name => 'cert_pkcs12' }, "api-version:s" => { name => 'api_version', default => 'v1.3' }, - }); + }); } $options{options}->add_help(package => __PACKAGE__, sections => 'REST API OPTIONS', once => 1); diff --git a/cloud/docker/cadvisor/mode/containerusage.pm b/cloud/docker/cadvisor/mode/containerusage.pm index 480c34149..0852fb386 100644 --- a/cloud/docker/cadvisor/mode/containerusage.pm +++ b/cloud/docker/cadvisor/mode/containerusage.pm @@ -263,9 +263,9 @@ sub manage_selection { my $last_dt = $self->parse_date(date => $last_ts); my $last_cpu_total = $last_stat->{cpu}{usage}{total}; my $last_cpu_user = $last_stat->{cpu}{usage}{user}; - my $last_cpu_system = $last_stat->{cpu}{usage}{system}; + my $last_cpu_system = $last_stat->{cpu}{usage}{system}; - my $diff_ts = $last_dt - $first_dt; + my $diff_ts = $last_dt - $first_dt; my $cpu_number = $machine_stats->{$result->{$container_id}->{NodeName}}->{num_cores}; my $read_io = {}; my $write_io = {};