1819761 Members
2909 Online
109606 Solutions
New Discussion юеВ

RC script details

 
Gus Fernandez
Occasional Advisor

RC script details

HI All,

HOw to check the follwoing daemons are running or not in the system.hp-ux 11.11 i v1 9000/800 servers:-
Printer daemon, nfs.server, nfs.client, mail daemon , nfs.core, vt, ptydaemon, graphical login, snmp, rbootd

Also tell me from where we can stop this daemons so that thy can not be start at boot time...

What about the rc scripts from where we can find out this details. our system is running in run level 3.

Thanks & rgeards,
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: RC script details

netstat is your friend.

To prevent startup, modify the scripts in /etc/rc.config.d

Example, for NFS, set the variables to 0 in nfsconf:

Instead of:

NFS_CLIENT=1
NFS_SERVER=1

Put:

NFS_CLIENT=0
NFS_SERVER=0

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Peter Godron
Honored Contributor

Re: RC script details

Kevin,
check the /etc/rc.log for which script starts which daemon.
or
run your greps against files in /sbin/init.d/

Modify the script in the /sbin/rc?.d directories.

Take care when disabling your daemons. No NFS ? No snmp ?


Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

So far you have not awarded any points !




James R. Ferguson
Acclaimed Contributor

Re: RC script details

Hi Kevin:

You control the 'rc' scripts my editing the appropriate file in '/etc/rc.config.d/'. The variables in these scripts control the scripts run by in '/sbin/init.d/'. The sequence of the running is in turn controlled by the ordering of symbolic links in each run-level directory. For run-level three (3) that directory would be '/sbin/rc3.d/'.

The man pages for 'rc(1M)' offer a concise explanation of the paradigm. You can also read the excellent whitepaper:

http://docs.hp.com/en/934/startup.pdf

Regards!

...JRF...
Jeff_Traigle
Honored Contributor

Re: RC script details

Determine if the services are enabled to run at boot time by looking at the associated files in /etc/rc.config.d. The init scripts are in /sbin/init.d. Most of the config files have names matching the init script, but there are a few oddballs. (CDE is controlled in /etc/rc.config.d/desktop and rbootd is controlled from /etc/rc.config.d/netdaemons, for example.) Looking the script to see what variable it's using to control whether it starts the service will give you the search string and you can grep for it on the files in /etc/rc.config.d if it becomes necessary to track one of the oddballs down.
--
Jeff Traigle
spex
Honored Contributor

Re: RC script details

Hi,

# UNIX95=1 ps -o pid= -C
will return the pid of , if is running.

Per your question, substitute the following for :
* lpsched
* nfsd
* sendmail
* ptydaemon
* xfs
* snmpdm
* rbootd

rc script configuration is done through config files in /etc/rc.config.d. Run level based starting/killing is handled by symlinks in /sbin/rc?.d/ to init scripts in /sbin/init.d/.

PCS
Gus Fernandez
Occasional Advisor

Re: RC script details

Thanks for all of you...

I have checked the alll the daemons and found all are disavbled in r.config.d confg. file but they are running in rc scripts...

Please let me know from where i can rate your replies.

Thanks
Yogeeraj_1
Honored Contributor

Re: RC script details

hi kevin,

even if the scripts exists in the rc directories, the values set in the corresponding files in /etc/rc.config.d/ dictates whether they will be started or not.


Please find attached one interesting document which explains how this works. (nb. even if the document is old, the concept is still valid)



hope this helps too!

kind regards
yogeeraj

PS.
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)