Linux newbie question

This is a discussion on Linux newbie question within the Linux General forums, part of the Linux Forums category; I am new to Linux and need to find out what daemons are running. How do I determine what is ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-05-2003
Lori
 
Posts: n/a
Default Linux newbie question

I am new to Linux and need to find out what daemons are running. How
do I determine what is and what isn't a daemon when I use the ps
command?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 08-05-2003
Floyd Davidson
 
Posts: n/a
Default Re: Linux newbie question

cummings@voyager.net (Lori) wrote:
>I am new to Linux and need to find out what daemons are running. How
>do I determine what is and what isn't a daemon when I use the ps
>command?


Others are giving you incorrect answers that relate to some
distributions of Linux, but not to others, and certainly not to
the ps command.

Run "ps x", and note the processes that have "?" listed under
the "TTY" column. Those processes have no controlling tty, and
technically are "daemon" processes in one sense or another.
However, they could be running from cron or might even be
something an individual is running, as opposed to system daemons
providing "services".

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com
Reply With Quote
  #3 (permalink)  
Old 08-05-2003
Mauriat
 
Posts: n/a
Default Re: Linux newbie question

Lori wrote:
> I am new to Linux and need to find out what daemons are running. How
> do I determine what is and what isn't a daemon when I use the ps
> command?
>
> Thanks!


In the gui you can run serviceconf. At the command line run 'chkconfig'.
For more info on chkconfig, run 'man chkconfig'.

You can also run 'service --status-all' as root.

--

Mauriat
----------------------------
Remove 'NOSPAM' to email me.

Reply With Quote
  #4 (permalink)  
Old 08-05-2003
John-Paul Stewart
 
Posts: n/a
Default Re: Linux newbie question

Vwakes wrote:
>
> On Tue, 5 Aug 2003 Lori wrote:
>
> >I am new to Linux and need to find out what daemons are running. How
> >do I determine what is and what isn't a daemon when I use the ps
> >command?

>
> ps won't list the processes started by xinetd,


Why not?

If they're not currently running, of course ps won't show them. But if
there is a running instance of that daemon, it had better be in the ps
listing!

> so 'chkconfig --list' is the way to go


That's distribution-specific (Red Hat, IIRC). Wouldn't that just list
processes controlled by the chkconfig mechanism, anyway?
Reply With Quote
  #5 (permalink)  
Old 08-06-2003
John-Paul Stewart
 
Posts: n/a
Default Re: Linux newbie question

Vwakes wrote:
>
> On Tue, 5 Aug 2003 John-Paul Stewart wrote:
> >Vwakes wrote:
> >> On Tue, 5 Aug 2003 Lori wrote:
> >>
> >> >I am new to Linux and need to find out what daemons are running.
> >> >How do I determine what is and what isn't a daemon when I use the ps
> >> >command?
> >>
> >> ps won't list the processes started by xinetd,

> >
> >Why not?

>
> Maybe coz of tcp wrappers?


What's that got to do with anything? I don't see how tcp wrappers would
prevent a running process from showing up in the output of ps.

> >If they're not currently running, of course ps won't show them.

>
> Yep. I meant the process directly started by xinetd and running
> (listening) still. The child processes started by this parent process
> can be viewed using 'ps' ofcourse.
>
> >But if there is a running instance of that daemon, it had better be in
> >the ps listing!

>
> That's the point. It need not be. See an eg below..


[snip]

> For eg, I run leafnode as xinetd
> service and here's the output of 'netstat'
>
> # netstat -paee |grep nntp
> tcp 0 0 *:nntp *:* LISTEN root 84537 19145/xinetd
> tcp 0 0 localhost.localdo:35718 localhost.localdom:nntp TIME_WAIT root 0 -
>
> # ps -ef |grep xinetd
> root 19145 1 0 14:09 ? 00:00:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid


If it is leafnode you're running, what does 'ps -ef | grep leafnode'
show?

I don't see how your example shows that processes started by xinetd do
not show up in the output of ps. You promised an example of a running
daemon not being shown by ps, but your example only looks for the xinetd
process itself, not the leafnode process.

(Please not, I'm trying to be argumentative here. I'm just curious and
seeking clarification.)
Reply With Quote
  #6 (permalink)  
Old 08-06-2003
Vwakes
 
Posts: n/a
Default Re: Linux newbie question

On Wed, 6 Aug 2003 armin walland wrote:
>
>don't automatically assume that all the helper tools of your distro are
>available on all distros.


If the OP can assume he can get answers by not telling his distro, why
not you assume any arbitrary distro while answering? You get half-baked
answers for half-baked questions. Fair enough?

To the OP: Read : http://www.catb.org/~esr/faqs/smart-questions.html

V.
Reply With Quote
  #7 (permalink)  
Old 08-06-2003
Vwakes
 
Posts: n/a
Default Re: Linux newbie question

On Wed, 6 Aug 2003 John-Paul Stewart wrote:
>> >> ps won't list the processes started by xinetd,
>> >
>> >Why not?

>>
>> Maybe coz of tcp wrappers?

>
>What's that got to do with anything? I don't see how tcp wrappers
>would prevent a running process from showing up in the output of ps.


I don't know too.

>> That's the point. It need not be. See an eg below..

>
>[snip]
>
>> For eg, I run leafnode as xinetd
>> service and here's the output of 'netstat'
>>
>> # netstat -paee |grep nntp
>> tcp 0 0 *:nntp *:* LISTEN root 84537 19145/xinetd
>> tcp 0 0 localhost.localdo:35718 localhost.localdom:nntp TIME_WAIT root 0 -
>>
>> # ps -ef |grep xinetd
>> root 19145 1 0 14:09 ? 00:00:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid

>
>If it is leafnode you're running, what does 'ps -ef | grep leafnode'
>show?


Oh well, maybe I forgot to say that it doesn't show anything.

# ps -ef |grep leafnode
root 8024 4660 0 08:48 pts/6 00:00:00 grep leafnode
#

>I don't see how your example shows that processes started by xinetd do
>not show up in the output of ps.


My implied point is if 'netstat' can't get the PID, I would assume 'ps'
can't too. Xinetd hides the process it starts. I don't know how/why or I
am missing something here.

>You promised an example of a running daemon not being shown by ps, but
>your example only looks for the xinetd process itself, not the leafnode
>process.


Yep. I wouldn't miss such an obvious thing. The 'nntp' is shown as a
process started by 'xinetd' and not by 'leafnode'.

>(Please not, I'm trying to be argumentative here. I'm just curious and
>seeking clarification.)


Me too. I have posted abt this few times before but nobody questioned so
no real truth found. So you post with 'know-it-all' attitude and ppl
would respond ;-).

Any ideas?

V.

Reply With Quote
  #8 (permalink)  
Old 08-06-2003
Peter T. Breuer
 
Posts: n/a
Default Re: Linux newbie question

Vwakes <vwakeNOSPAM100@softhome.net> wrote:
> Oh well, maybe I forgot to say that it doesn't show anything.


> # ps -ef |grep leafnode
> root 8024 4660 0 08:48 pts/6 00:00:00 grep leafnode


Then its not running. Leafnode would only run when someone CONNECTS to
the port. What's listening ion the prot right now is xinetd. Connect,
and it it will start leafnode, which will then show up in ps.


Peter
Reply With Quote
  #9 (permalink)  
Old 08-06-2003
Vwakes
 
Posts: n/a
Default Re: Linux newbie question

On Wed, 6 Aug 2003 Peter T. Breuer wrote:
>Vwakes <vwakeNOSPAM100@softhome.net> wrote:
>> Oh well, maybe I forgot to say that it doesn't show anything.

>
>> # ps -ef |grep leafnode
>> root 8024 4660 0 08:48 pts/6 00:00:00 grep leafnode

>
>Then its not running. Leafnode would only run when someone CONNECTS to
>the port. What's listening ion the prot right now is xinetd.
>Connect, and it it will start leafnode, which will then show up in ps.


Yep. That's cool. Leafnode fooled me.

$ telnet localhost 119
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 Leafnode NNTP Daemon, version 1.9.41.rel running at localhost.localdomain
....

$ ps -ef |grep leafnode
news 13674 4869 0 12:16 ? 00:00:00 leafnode

$ ps -ef |grep xinetd
root 4869 1 0 07:05 ? 00:00:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid

Tks Peter.
V.
Reply With Quote
  #10 (permalink)  
Old 08-12-2003
Vwakes
 
Posts: n/a
Default Re: Linux newbie question

On Tue, 12 Aug 2003 John Winters wrote:
>In article <Pine.LNX.4.55.0308060847050.7641@xnqnccn.cvarzna> ,
>Vwakes <vwakeNOSPAM100@softhome.net> wrote:
>>
>>My implied point is if 'netstat' can't get the PID, I would assume
>>'ps' can't too. Xinetd hides the process it starts. I don't know
>>how/why or I am missing something here.

>
>This is nonensical speculation. Xinetd doesn't "hide" processes at
>all.
>
>Xinetd (and inetd) simply do listens on behalf of configured server
>processes.


YEP. Learnt it. Thanks.

V.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:44 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0