1825766 Members
2134 Online
109687 Solutions
New Discussion

Re: daemons

 
SOLVED
Go to solution
Anjaneyulu
Frequent Advisor

daemons

Hi,

I want to know the if daemons are running which type of output it will generate.
How we findoue daemons are running or not?
7 REPLIES 7
Aneesh Mohan
Honored Contributor

Re: daemons

Hi Anjan,

> I want to know the if daemons are running which type of output it will generate

you mean "if" command ,it is just a command for scripting and no need a specific daemon for this.

Usually ,you can confirm the status of the service (services are associated with daemons) by using ps command

#ps -aef |grep mbd (-- for checking samba service)


Aneesh



Ganesan R
Honored Contributor

Re: daemons

Hi,

Daemons are called services sometimes and it will not generate specific output. It will do it's own job.

For example inetd daemon is the master internet daemon which will control other daemons like telnet, ftp, rlogin, remsh, etc.
Whenever telnet request comes, inetd daemon will start new telnetd daemon which will provide the telnet daemon.

You can use ps command with different switch to see the status of daemons.

Best wishes,

Ganesh.
Anjaneyulu
Frequent Advisor

Re: daemons

ps -ef|grep nfsd
root 312 1 0 Oct 09 ? 0:00 /usr/lib/nfs/nfsd -a 16
user1 23096 23082 0 05:18:57 pts/2 0:00 grep nfsd


In the above output how i confirm the nfsd is running or not. If daemon is not running which type of output i will get?
sreekanthtm
Trusted Contributor
Solution

Re: daemons

Hi,

Look at my system o/p

# ps -ef | grep nfs
root 32 0 0 Sep 19 ? 0:00 nfs_failover
root 33 0 0 Sep 19 ? 0:00 nfs4clntkd
root 31 0 0 Sep 19 ? 0:05 nfs_async_io
root 29 0 0 Sep 19 ? 0:00 nfs_reclaim
root 34 0 0 Sep 19 ? 0:00 nfs4_async_io
root 81 0 0 Sep 19 ? 0:00 nfs4srvkd
root 80 0 0 Sep 19 ? 0:00 nfslogkd
root 1004 1 0 Sep 19 ? 0:00 /usr/sbin/nfs4cbd
root 1010 1 0 Sep 19 ? 0:29 /usr/sbin/nfsmapid
root 1959 1 0 Sep 19 ? 0:00 /usr/sbin/nfsd
root 7959 6696 0 16:46:14 pts/tc 0:00 grep nfs

NFS is running on my system... The last line "grep nsf" will come any way.

Rgds
Sreekanth
Ganesan R
Honored Contributor

Re: daemons

Hi,

>>If daemon is not running which type of output i will get? <<

If daemon is not running you won't get the daemon details in ps output.

ps command will provide the running process/daemon details.

Best wishes,

Ganesh.
Suraj K Sankari
Honored Contributor

Re: daemons

Hi,
for checking demons or any process are running into the server ps is the command

$ ps -aef | grep -i nfs
root 3379 3355 0 Sep 24 ? 0:00 /usr/sbin/nfsd 16
root 3380 3355 0 Sep 24 ? 0:00 /usr/sbin/nfsd 16
root 3381 3355 0 Sep 24 ? 0:00 /usr/sbin/nfsd 16
monitor 1202 1128 0 17:03:20 pts/0 0:00 grep -i nfsd

where aef means
-a Select all processes except process group leaders and processes not associated with a terminal.
-e Select all processes.
-f Show columns user, pid, ppid, cpu, stime, tty, time, and args, in that order.


Suraj
Anjaneyulu
Frequent Advisor

Re: daemons

Hi suraj,

In the above output you have the ? at tty.

But I got pts/0 at tty it is running or not.