Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion apachebuddy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,13 @@ sub get_memory_usage {

# pmap -d is used to determine the memory usage for the
# individual processes
my $pid_mem_usage = `pmap -d $_ | grep writeable/private | awk \'{ print \$4 }\'`;
my $pid_mem_usage;
if (-f "/etc/SuSE-release")
{
$pid_mem_usage = `pmap -d $_ | grep writable-private | awk \'{ print \$1 }\'`;
} else {
$pid_mem_usage = `pmap -d $_ | grep writeable/private | awk \'{ print \$4 }\'`;
}
$pid_mem_usage =~ s/K//;
chomp($pid_mem_usage);

Expand Down