- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Servers - General
- >
- Re: HP Power Protect will not run a custom script ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2013 08:23 PM
03-12-2013 08:23 PM
HP Power Protect will not run a custom script when shutting down?
Hi Guys
Got a brand new shiny ML310e G8 server running Win2008. We connect a brand new shiny R/T3000 G2 UPS to the server via a serial cable and install HP Power Protection. Everything appears to be working fine. HP Power Protection software detects the UPS and we can configure it to Shutdown the server after 2mins. Pull out the power on the UPS and the server shutdowns gracefully after 2 minutes. Brilliant....!
The HP Power Protection User Guide pdf talks about the Shutdown Configuration window. You can choose four different options to occur during a power cut. Hibernate, Shutdown, Shutoff and Script. We change it from Shutdown to Script. The absolute path we type in for the script is identical to the pdf example. Ie c:\shutdown.bat ... We then go and create a file called shutdown.bat and place it in the location c:\ on the server. The shutdown.bat file is just
REM It works
Pause
Disconnect the power again and the HP Power Protection software advises us politely that the the server will shutdown in 2 mins, just like before. But,.... when two minutes is up and the server says it is shutting down, nothing happens. The batch file doesn’t run...!?!
Have tried running the batch file manually to make sure it works. A DOS screen pops up and waits for you to hit a key – pretty basic. So, what gives....? What are we missing or is this a bug with the software...?
Have downloaded the latest HP Power Protection v 1.02 build 026.
Have tried installing it on a Win7 PC and get the same result. The script option doesn’t work...?
Have tried different batch files in different locations on the server and the PC.
Any advice welcome
Cheers
Mike
- Tags:
- UPS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2013 05:22 AM
03-14-2013 05:22 AM
Re: HP Power Protect will not run a custom script when shutting down?
Kindly use the below details in the shutdown script and save the shutdown script to C: Driver and map the shutdown script created to Network Module.
c:\windows\system32\shutdown -s -t 00
-s is to shutdown the server
-t is set time for it to wait before it shuts down.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2013 08:21 AM
03-14-2013 08:21 AM
Re: HP Power Protect will not run a custom script when shutting down?
Adding to previous post I have seen this issue in the past. sometimes when customer runs the server as a script & is monitoring the server via Terminal Session then he would notice the script not running in there but it might have stalled in the actual server.
for testing I ran the windows calculator & I did'nt see it pop-up in terminal session & it worked when observed via ILO remote console.
So kindly ignore if you were doing this on actual physical server accessing it directly. If anyother like running in guest OS etc then it may not work.
Thank you
I am an HP Employee
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2013 08:20 PM
03-14-2013 08:20 PM
Re: HP Power Protect will not run a custom script when shutting down?
Thanks for taking the time to reply.
Sort of getting there....
I tried replacing the HP Power Protector script field to c:\windows\System32\shutdown –s –t 300 as you suggested. Pulled the power lead out of the UPS and the script ran fine. Great...! Created a batch file called test.bat to read c:\windows\System32\shutdown –s –t 300
Copied the test.bat file to c:\Users\Administrator\My Documents
Changed the HP Power Protector script field to c:\ Users\Administrator\My Documents\test.bat
Disconnected the power and the script ran ok again. The server was going to power down...! Cool...!
So all we needed now was to customise my batch file to do other stuff. But do you think I can get them to run – Arghhhhh... This is doing my head in.
After a lot of experimenting my batch file test.bat looks like this now. (it’s very complex – lol) c:\windows\System32\shutdown –s –t 300
c:\windows\System32\calc
When HPPP detects a power cut it runs the test.bat file and the system shutdown message pops up but the Windows Calculator does not pop up?
When I transpose the commands to read
c:\windows\System32\calc
c:\windows\System32\shutdown –s –t 300
Nothing happens when we disconnect the power.
If I type test.bat from a command line prompt the Windows calculator pops up. When I close the Windows Calculator the System Shutdown message pops up ... All good, although I would expect the System Shutdown message to pop up without me having to close down the Windows Calculator.
Soooooo, why can’t this same batch file run correctly from HPPP. Is it just a silly syntax thing we are missing or is it something hard coded into HP Power Protector that only allows us to run a “Shutdown” command and nothing else....?
Cheers Mike
P.S. We are running this directly from the console. No remote access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2013 01:26 AM
03-15-2013 01:26 AM
Re: HP Power Protect will not run a custom script when shutting down?
Hi,
Shutdown Script can include the below entries.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2013 09:52 AM
06-23-2013 09:52 AM
Re: HP Power Protect will not run a custom script when shutting down?
I had the same problem.
tried to shutdown an proprely an esxi host from a distant windows machine with a PS script
did you found the solution or finaly this script have to integrate only the shutdown command??
in the page 60 of the doc say
Script—This option manages the shutdown using a CUSTOM script that you can create to customize
your own shutdown sequence. You can integrate the standard Windows shutdown command...
when i read i understand you can make a CUSTOM script that can do many operation beside the shutdown.
i do not understand when i read, you can integrate ONLY the standard windows shutdown command..
if it is true i dont see really the interest in this option , completly useless.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2013 02:16 PM
11-15-2013 02:16 PM
Re: HP Power Protect will not run a custom script when shutting down?
Hi All,
Let me clarify the difference between these 2 options available in the Hp Power Protector Software.
Shutdown Type: Shutdown --> By Default, Shutdown Command is sent to the Management Server after the value (time) provided in the " Shutdown Initiated after(sec)" .
Shutdown Type: Script --> By Default, Shutdown command is NOT sent to the Management Server. For achieving graceful shutdown of the OS, shutdown command has to be specified in the script. If it is not specified, then the management server will powerOFF abruptly after the time specified in " OS shutdown time " since the UPS will unplug power to the load segment.
eg: shutdown.exe /s /t 0 /d p:1:1
Here are few scenarios that you can test.
1. If the shutdown command is specified in the script, Load Segment shutOFF is enabled.
Management server will gracefully shutdown.
Load segment will be turned OFF.
And then the UPS will also go OFF.
2. If the shutdown command is specified in the script & Load segment shutoff is Disabled.
Management server will shutdown gracefully & the load segment will stay ON for the time specified in the field " OS shutdown time ".
3. If the shutdown command is NOT specified in the script & Load segment shutoff is enabled.
Management server will continue working. No shutdown sequence is initiated. Server will stay ON till the end of the time specified in the field " OS shutdown time " and it will powerOFF abruptly.
4. If the shutdown command is NOT specified in the script & Load Segment shutoff is disabled.
Management Server will Stay ON till the battery is depleted.