HPE 9000 and HPE e3000 Servers
cancel
Showing results for 
Search instead for 
Did you mean: 

How can script poweroff a 9000 D class or an N class

 
Tina Waitherwerch
Occasional Advisor

How can script poweroff a 9000 D class or an N class

I'm working on hurricane scripts that will orderly shutdown and power off production servers in the event of an extended powerfail. I can shut things down, but how do I issue a 'shutdown and power off' in one swift command - or can I??
7 REPLIES 7
paul courry
Honored Contributor

Re: How can script poweroff a 9000 D class or an N class

I don't think you can poweroff the system.

Perhaps if you did it through the UPS, but as a former CE I'm aware of no way to shut power off once the system has gone through shutdown.
Jeff Schussele
Honored Contributor

Re: How can script poweroff a 9000 D class or an N class

Hi Tina,

On newer systems i.e A, L, N & RPxxxx systems the GSP has the PC or Power Control option to remotely power down/up systems. But remember you'd have to connect to a console port to do this.
And this option cares not what state the system is in, so you'd have to insure that shutdown has completed prior to using PC.
I'm not sure I'd like to have a script lying around that can power cycle machines. I'd keep a VERY short leash on that puppy. And of course you'd have to deal with the issue of having clear-text usernames & PWs in that script.....

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: How can script poweroff a 9000 D class or an N class

The D-class cannot be powered off in software. Most N,L and A class cannot although as mentioned, the newer boxes do have a power control capability.

It all depends on how fast you need to perform the shutdown. A script can run the shutdown -h 0 command but this could take minutes to complete. Unfortunately, things like NFS can delay this task significantly if other systems are not responding. The fastest way to shutdown is:

reboot -qh

which will bypass all shutdown scripts, sync the disks and halt...in seconds. But database programs are simply killed (well, they just stop running) without any chance to close their files in a logical manner...that can be a problem.


Bill Hassell, sysadmin
Grant Willey
Advisor

Re: How can script poweroff a 9000 D class or an N class

Tina,
If you have or can purchase an APC SmartUPS, it should come free with the Powerchute software for HP-UX that will perform the auto-shutdown as you request. You can set the parameters to shutdown the server once the UPS is drained down to a certain % of running time. I am in the process of configuring my D220 to do this procedure. Maybe we could help each other. gwilley@dmv.com. Let me know if this helps.
Patrick Wessel
Honored Contributor

Re: How can script poweroff a 9000 D class or an N class

Tina,
The only way to power down a D-Class by commandline that I can imagin is using an UPS (the power_onoff command of a PowerTrust would be a way)
I never tried it on a N-Class, but it might be possible with a Kermit script using the internal GSP port
There is no good troubleshooting with bad data
RolandH
Honored Contributor

Re: How can script poweroff a 9000 D class or an N class

I knew no command which will power off your D-Class server.

I think a good way is to protect your D-Class Server with a power supply which will shutdown your server in case of power fail. And additional set the autoboot option to off. You can do this with the setboot command.
This prevent the server from rebooting if the power will come back and go away in a situation the server will reboot. You must manualy startup your server and you can do this at time you are sure the power will be stable. If the server is on a remote site - connect a web console to the console port. Then you are able to connect to the server and restart it.

Just some thoughts but its a way you can go.

Roland
Sometimes you lose and sometimes the others win
Steven E. Protter
Exalted Contributor

Re: How can script poweroff a 9000 D class or an N class

Our D320 and D380 servers are in racks with UPS.

There is a serial connection between the box and the UPS.

There is a setting in /etc/inittab that lets you trigger an orderly system shutdown a certain number of minutes after a power fail.

I think its ups_mon or upsmond

There may be some information in this search that you find useful.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com