Your process checking looks too complicated; there might be OS specific commands/options that won't require filtering of ps run itself. Perhaps some native Perl module may be in existence for the purpose.
Day 17: Checking process existence and listing processes (Proc::Find) mentions pgrep & Proc::Find to find a process by name, among other ways.
In reply to Re^4: How to automate login to different servers via ssh and check is some specific processes are running or not.
by Anonymous Monk
in thread How to automate login to different servers via ssh and check is some specific processes are running or not.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |