Operating System - VMware
1752701 Members
5546 Online
108789 Solutions
New Discussion

P4300 G2 shutdown Script via SSH if you get power cut

 
Alp_Just
Occasional Contributor

P4300 G2 shutdown Script via SSH if you get power cut

Is there a way to shutdown the Lefthand via Script with SSH if the power cuts off? I am using Eaton UPS. 
What would you write into the script for automatical shutdown if the power cuts off?

3 REPLIES 3
Rachna-K
HPE Pro

Re: P4300 G2 shutdown Script via SSH if you get power cut

@Alp_Just

 

There are no scripts available for StoreVirtual.

 

But you can use write scripts which use the cliq to do the commands like shutdown. 


Regards,
Rachna K
I am an HPE Employee

Accept or Kudo




Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company
Alp_Just
Occasional Contributor

Re: P4300 G2 shutdown Script via SSH if you get power cut

Do you have maybe another SSH script for shutdown or smth like that? Just to have the right command.
Or could you maybe at least tell me the right command for shutting it down? Is there the possibility to connect on it via SSH? If yes, which version?

 

BR

Rachna-K
HPE Pro

Re: P4300 G2 shutdown Script via SSH if you get power cut

@Alp_Just

 

We can run the shutdown command through SSH. However, we (Support Team) need to generate one time passwords to log into root.

We can shutdown the Node through Cliq. Below are the steps for the same.

1. Open a Putty Session

2. Enter the IP Address of the Node on Port 16022

3. Run the following Command:

 

Syntax
shutdownNsm {login=} { userName= passWord= | groupName= } {action=} [delay=]
Parameters
Name Description
The IP addresses or DNS-resolvable names of one or more storage
systems.
{login}
The authentication user name for the storage system. If you use this
parameter, you must include the passWord parameter with it. Or, you can
use the groupName parameter instead of userName and passWord.
{userName}
The name of the management group. Use this parameter if you do not use
the userName and passWord parameters. Because groupName has
{groupName}
cached credentials, it does not require the userName and passWord
parameters.
The password for the storage system. Required when the userName
parameter is used.
{passWord}
The operation to perform. Values are Shutdown—Powers off the storage
system, Restart—Reboots the storage system, and Cancel—Cancels a
restart or shutdown, if pending.
{action}
[delay] The number of minutes to delay prior to shutdown or restart (defaults to 0).

 

CAUTION:
• Shutting down a storage node may cause loss of access to volumes or degrade performance.
• This command will display a prompt, requiring confirmation before proceeding. This prompt
may be overridden with an optional prompt=0 parameter on the command line; in this case,
the command will always run without pausing for confirmation.

 

 


Regards,
Rachna K
I am an HPE Employee

Accept or Kudo




Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company