cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX Daemons

Octavio Sanchez
Occasional Visitor

HP-UX Daemons

I need to manually stop a daemon on my HP9000. What is the command to stop a single daemon?
9 REPLIES
Patrick Wallek
Honored Contributor

Re: HP-UX Daemons

Which daemon?

How to stop it depends entirely on the daemon you want to stop.

Octavio Sanchez
Occasional Visitor

Re: HP-UX Daemons

I need to stop spx.
Patrick Wallek
Honored Contributor

Re: HP-UX Daemons

The first thing I would do is look in the /sbin/init.d directory and see if there is a script for spx. If so, you should be able to do something like:

# /sbin/init.d/spx stop

If not, what product is this daemon part of? Perhaps there is a script for the product itself.
muruganantham raju
Valued Contributor

Re: HP-UX Daemons

Hi,
Not sure what is the spx deamon? Is it printer related? If you know the packages that installed this deamon, you can find the binary to start/stop this deamon.
Or else you can abruptly kill the deamon kill -9

HTH
Muru
James R. Ferguson
Acclaimed Contributor

Re: HP-UX Daemons

Hi:

> Muru: Or else you can abruptly kill the deamon kill -9

Using 'kill -9' on anything other than a process that *first* doesn't respond to a simple kill ('kill -TERM') or generally for daemons ('kill -HUP') is asking for trouble.

A 'kill -9' can't be caught (or trapped) by a signal handler and thus doesn't give a process to a chance to remove temporary files or shared memory segments.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: HP-UX Daemons

Hi (again):

I should clarify a bit: daemons often use a 'kill -HUP' to re-read any configuration file and/or restart. One example is with the 'syslogd' daemon where this can be done with:

# kill -HUP $(< /var/run/syslog.pid)

What exactly a process does with a signal is dependent on the signal and the coding of any signal handlers. Signals have default actions and some can be ignored of caused to perform the action of their signal handler as I noted. A 'KILL" (-9) can't be trapped which means you have no ability to do anything.

Regards!

...JRF...
Viktor Balogh
Honored Contributor

Re: HP-UX Daemons

Hi,

At first, you need to find out what is this particular daemon used for. Post the output of the following commands:

To find the responsible init script:
# grep -l spx /sbin/init.d/*
If a filename is printed as a result, you might found the init script for your spx daemon. At best, you should try this to stop the daemon:

# /sbin/init.d/[spx_init_script] stop

If this doesn't help,

To find out the location of the binary:
# ps -ef | grep spx
# whereis spx

Look among the man pages:
# catman
# man -k spx

Regards,
Viktor
****
Unix operates with beer.
Octavio Sanchez
Occasional Visitor

Re: HP-UX Daemons

hey thanks for your help. I was able to find what I needed with google.com.
muruganantham raju
Valued Contributor

Re: HP-UX Daemons

Thanks JRF. The explanation on kill -9 is very informative.