1756704 Members
2232 Online
108852 Solutions
New Discussion юеВ

Re: Services in HP-UX

 
SiddhV
New Member

Services in HP-UX

Hi All,
I am new to Hp-Ux. I want to know the command to list all the active services. How to check which services will be running for particular runlevel. How to start or stop the service and how to check its status.

In linux I use to use
#chkconfig --list

Is there any command in HP-UX similar to it?

Thanks in Advance....
Appreciate revert.
9 REPLIES 9
rariasn
Honored Contributor

Re: Services in HP-UX

Hi,

# man rc

rgs,
stephen peng
Valued Contributor

Re: Services in HP-UX

you can edit /etc/services to enable or disable services on HP-UX.
stephen peng
Valued Contributor

Re: Services in HP-UX

sorry I misunderstood and just made a mistake. you could find the services similiar to output of chkconfig --list in /sbin/init.d, and symbolic links are at /sbin/rc*.d(* represent run level), and you could configure services to be started at specific run level by edit configuration file at /etc/rc.config.d. As rariasn said, you can man rc for detail information.
SiddhV
New Member

Re: Services in HP-UX

Thanks for Ur prompt response...
But still my purpose is not solved completely...
What if for eg. I want to start lp service in runlevel 3.
How do i chk its status if it is running or hanged or stopped.
(sry guys I am linux guy so trying to relate things with linux.. pls bare with me :-( )
Like in linux it would clearly give like:
#service lp start
lp is started.
# service lp status
lp is running
#

Steven Schweda
Honored Contributor

Re: Services in HP-UX

> you can edit /etc/services to enable or
> disable services on HP-UX.

Not really. You can edit "/etc/services".
That may or may not enable or disable
anything. The world would be a better place
if people stopped offering advice like this.
stephen peng
Valued Contributor

Re: Services in HP-UX

>The world would be a better place
>if people stopped offering advice like this.

The world would be a much better place if people could show their generosity when thing not going as they wish.

read the reply below my first reply.
stephen peng
Valued Contributor

Re: Services in HP-UX

Siddhv,
you can check out /etc/rc.log for services startup status at os startup time, of course sometimes services would stop or hang accidently, you could use ps to check whether the process of specific services was ok, I don't remember whether there was status option for scripts at /sbin/init.d beside stop and start, you can check out those scripts yourself.
sorry for my poor english expression
Torsten.
Acclaimed Contributor

Re: Services in HP-UX

... you can edit /etc/services ...


Why? No!



==>
Definition: /etc/services: On UNIX, the configuration file /etc/services maps port numbers to named services. Key point: Its role in life is so that programs can do a getportbyname() sockets call in their code in order to get what port they should use. For example, a POP3 email daemon would do a getportbyname ("pop3") in order to retrieve the number 110 that pop3 runs at. The idea is that if all POP3 daemons use getportbyname(), then no matter what POP3 daemon you run, you can always reconfigure its port number by editing / etc/services. Misunderstanding: This file is bad in order to figure out what port numbers mean. If you want to find out what ports programs are using, you should instead use the program lsof to find out exactly which ports are bound to which processes. If running lsof is not appropriate, then you should lookup the ports in a more generic reference.

.................................
Source: Hacking-Lexicon / Linux Dictionary V 0.16
http://www.tldp.org/LDP/Linux-Dictionary/html/index.html
Author: Binh Nguyen linuxfilesystem(at)yahoo(dot)com(dot)au
.................................

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Tingli
Esteemed Contributor

Re: Services in HP-UX

There is no chkconfig in hp-ux. For most unix systems, all the start up and stop scripts are kept in directories /etc/init.d, /sbin/rc0.d, /sbin/rc1.d, /sbin/rc2.d and /sbin/rc3.d. Their location decides their run level, such as in /sbin/rc2.d is for run level 2 and /sbin/rc3.d is for run level 3.

Usually, the original scripts are kept in /etc/init.d and all the others are just link to the original scripts.

There is also /etc/rc.config.d directory, which decides whether the start script should be run or not.

When hp-ux is booting up, its console shows the list of the scripts are successful or not.

If you want to start or stop a service individually, you need to go to /sbin/init.d to run the script with start or stop after it.

This is just a simple description and you need to check the manual for details.