mirror of https://github.com/mikaku/Monitorix.git
Improved the way how are detected processes in Process.pm module
This commit is contained in:
parent
87f367a7db
commit
ea8ec79ae7
|
@ -170,7 +170,7 @@ sub process_update {
|
||||||
# check if that process is running
|
# check if that process is running
|
||||||
if(open(IN, "ps -eo pid,comm,command |")) {
|
if(open(IN, "ps -eo pid,comm,command |")) {
|
||||||
while(<IN>) {
|
while(<IN>) {
|
||||||
if(m/^\s*(\d+)\s+(\S+)\s+(\S+)\s+/) {
|
if(m/^\s*(\d+)\s+(\S+)\s+(.*?)$/) {
|
||||||
if($p eq trim($2)) {
|
if($p eq trim($2)) {
|
||||||
push(@pid, $1);
|
push(@pid, $1);
|
||||||
$pro++;
|
$pro++;
|
||||||
|
|
Loading…
Reference in New Issue