1823280 Members
3194 Online
109648 Solutions
New Discussion юеВ

Shut down hp-ux properly

 
ViS_2
Frequent Advisor

Shut down hp-ux properly

Hi!
Are there proper means to shutdown hp-ux on rx26x0/rp34x0 or on D370 by simple pressing the power buttom?

When i uncomment the "powf" entry in the /etc/inittab and issue "init q" the pressing the power buttom does not affects the init process. It does not invokes the /sbin/powerfail script. But the kernel undestands this event as i assume, because file systems are unmounted and logical volumes are cleaned.
The init does not ignore SIGPWR: "kill -19 1" produces proper shutdown.

Sorry for my english.
8 REPLIES 8
RAC_1
Honored Contributor

Re: Shut down hp-ux properly

You also need to have properly configured /etc/powerfailed.conf (some something similar)
There is no substitute to HARDWORK
Adisuria Wangsadinata_1
Honored Contributor

Re: Shut down hp-ux properly

Hi Victor,

The proper way to shutdown the HP-UX box is by using 'shutdown' command, check the man page of shutdown for more details :

# man shutdown

Pressing the power button also can be done, for me using 'shutdown' command give me a complete satisfied since I can see clearly the shutdown process. So if I notice something wrong, I can do some necessary steps to troubleshoot/solved the issue.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
ViS_2
Frequent Advisor

Re: Shut down hp-ux properly

Thanks for your replies.

Yes, I know what the "shutdown" command is.
I know than the using of that command is the best way to shut down the unix.
But...
I have about a dozen small servers (rp34x0/rx26x0), and I have a staff that is not familiar with the unix. That servers must be powered up at morning and powered down at evening. No admin for that staff.

So I need to teach somebody to log in every server and to type "/sbin/shutdown -hy 0", or make some script than automates this process on all servers after some user logs in some "main" server.

Or, if it is posible, any user can press the power buttons on the front sides of every server.

Thanks.
Mark Nieuwboer
Esteemed Contributor

Re: Shut down hp-ux properly

Victor,

If you want to power down the system every day put shutdown -hy 0 in the crontab of root.
If you want to start up the server you have to ways.
1. go to the server and hit the power butten.
2. logon the mp (gsp) console with the Admin user and after that hit the commands cm , bo after that the server should boot.

But why do you want to boot the server every day it's bad for the hardware and isn't needed for unix our you must have a very poor written application. If that's so i would fix that it's cheaper then reboot the server every day.

grtz. mark
ViS_2
Frequent Advisor

Re: Shut down hp-ux properly

Mark Nieuwboer

Our davelopers starts there work nearly at 9.00, but there is no hard time limits of their finish. They may stop at 16.00 and may stop at 21.00.
So cron is not the solution.

There is no critical applications on that servers, software developing only.

Uninterruptable power will be soon.
Wim Rombauts
Honored Contributor

Re: Shut down hp-ux properly

I agree with Mark : Why shutdown the servers every evening ? We keep our servers just running, even our development servers.

If they are only development servers, maybe security is not that big an issue ?
-> You could add the usernames of some senior developers to file /etc/shutdown.allow. That would allow them to use the shutdown command without being root.
-> Or you could write a script with suid to root (this is said to be "not done" in secure environments !) and allow the programmers to execute this script.
ViS_2
Frequent Advisor

Re: Shut down hp-ux properly

Oh...

I understand that my english is too bad.

All I want is to shutdown my rp/rx servers by simple pressing the power button. Is it possible whith hp-ux???

I mentioned earlier that uncommenting of the "powf" entry in the /etc/inittab and issuing the "init q" is NOT enough.

It seems to methat kernel DOES NOT send the SIGPWR to the init.
Bharat Katkar
Honored Contributor

Re: Shut down hp-ux properly

Hi Victor,
RAC pointed you correctlt.
Have a look at follwing three files.

# /sbin/powerfail HP-supplied execution script
# /etc/powerfail.cfg user-modifiable configuration values
# /etc/local/powerfail user-modifiable execution script


Hope that helps.
Regards,
You need to know a lot to actually know how little you know