http://qs1969.pair.com?node_id=217391


in reply to How to verify if a daemon is up and running ?

If you are going to use system-specific ps flags, you might as go all the way and save the use of grep and parsing the ps output. With the Linux ps, you can get just the pid of the syslogd process with:
ps -C syslogd -o pid=
You can remove the current process from the list by removing the current process id in $$.