LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do I find the PID of a daemon? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-find-the-pid-of-a-daemon-742027/)

SoulShaker 07-22-2009 01:53 PM

How do I find the PID of a daemon?
 
We have some third party software running as a daemon on some RedHat servers. I am trying to setup Zenoss alerts to monitor when the daemon is running. For those unfamiliar with Zenoss, I need to write a regular expression to identify the process. The problem is, for this daemon, even though it is running, there isn't a process that shows up in the ps list with the daemon's name.

For example, if my daemon is running at /etc/init.d/thisprocess, I do a 'ps aux | grep -i thisprocess', and I get nothing returned, even though the daemon is running. So my question is, how can I find the PID that the daemon is running under? From there, I can then write my regular expression based on the text next to the PID in the ps listing.

david1941 07-22-2009 02:01 PM

Does not "pgrep processname" return the PID?

SoulShaker 07-22-2009 02:08 PM

No, pgrep-ing the daemon name doesn't work either. The problem is that the daemon name is different than the process name, so even though the daemon is running, grepping for the daemon name when running 'ps aux' returns nothing.

mostlyharmless 07-22-2009 02:14 PM

What does show up with ps aux? Something predictable but not the daemon name?

SoulShaker 07-22-2009 02:30 PM

Nothing shows up when I do a 'ps aux'.

After looking a bit closer through some of the other running processes, I'm beginning to think that this process may actually be running under the java process.


All times are GMT -5. The time now is 05:13 AM.