Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into strongswan-5

This commit is contained in:
Michael Tremer
2012-09-12 16:14:31 +02:00
67 changed files with 4056 additions and 787 deletions

View File

@@ -240,7 +240,7 @@ sub isrunning{
my $pid = '';
my $testcmd = '';
my $exename;
my @memory;
my $memory;
$cmd =~ /(^[a-z]+)/;
$exename = $1;
@@ -256,13 +256,18 @@ sub isrunning{
}
close FILE;
}
if (open(FILE, "/proc/${pid}/statm")){
my $temp = <FILE>;
@memory = split(/ /,$temp);
if (open(FILE, "/proc/${pid}/status")) {
while (<FILE>) {
my ($key, $val) = split(":", $_, 2);
if ($key eq 'VmRSS') {
$memory = $val;
last;
}
}
close(FILE);
}
close FILE;
if ($testcmd =~ /$exename/){
$status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td><td align='center'>$pid</td><td align='center'>$memory[0] KB</td>";
$status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td><td align='center'>$pid</td><td align='center'>$memory</td>";
}
}
return $status;