Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-22-2009, 01:53 PM   #1
LQ Newbie
Registered: Oct 2006
Posts: 12

Rep: Reputation: 0
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.
Old 07-22-2009, 02:01 PM   #2
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 58
Does not "pgrep processname" return the PID?
Old 07-22-2009, 02:08 PM   #3
LQ Newbie
Registered: Oct 2006
Posts: 12

Original Poster
Rep: Reputation: 0
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.
Old 07-22-2009, 02:14 PM   #4
Senior Member
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,781
Blog Entries: 14

Rep: Reputation: 279Reputation: 279Reputation: 279
What does show up with ps aux? Something predictable but not the daemon name?
Old 07-22-2009, 02:30 PM   #5
LQ Newbie
Registered: Oct 2006
Posts: 12

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get PID of screen session started as daemon marsupillami Programming 4 06-08-2009 05:16 PM
Find PID of /bin/sh command in C++ Curtor Programming 3 12-11-2008 09:04 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
how to find all files with pid Zac2003 Linux - Software 2 10-27-2004 09:44 PM
daemon pid error! zecodela Linux - Software 0 10-23-2004 08:07 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration