(plugin) os::linux::local - mode process inacurrate memory usage (#4529)
This commit is contained in:
parent
9f778ed15b
commit
aff7824430
|
@ -295,7 +295,7 @@ sub add_memory {
|
||||||
next if ($options{content} !~ /==>\s*\/proc\/$pid\/statm.*?\n(.*?)(?:==>|\Z)/ms);
|
next if ($options{content} !~ /==>\s*\/proc\/$pid\/statm.*?\n(.*?)(?:==>|\Z)/ms);
|
||||||
my @values = split(/\s+/, $1);
|
my @values = split(/\s+/, $1);
|
||||||
|
|
||||||
my $memory_used = ($values[1] * $self->{option_results}->{page_size}) + ($values[5] * $self->{option_results}->{page_size});
|
my $memory_used = ($values[1] * $self->{option_results}->{page_size});
|
||||||
$self->{processes}->{$pid}->{memory_used} = $memory_used;
|
$self->{processes}->{$pid}->{memory_used} = $memory_used;
|
||||||
$self->{global}->{memory_used} += $memory_used;
|
$self->{global}->{memory_used} += $memory_used;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue