in reply to How best to see if syslogd is running?

I would go further than checking the content of /var/run/syslogd.pid and seeing whether there's a process running with that id. After all, if syslogd went down, another process could have taken PID syslogd was using.

Furthermore, to check whether a PID is in use, and what program is using it, I would use neither kill, nor ps. I'd run something like (untested):

my $pidfile = "/var/run/syslogd.pid"; if (-e $pidfile && qx "cat /proc/`cat $pidfile`/cmdline" =~ /^syslogd$/) { ... syslog is running ... }
Notes: