HP ML150 ISS Technology Update, Volume 7, Number 8 - Page 5

Common SM CLP scripting commands for ProLiant server management

Page 5 highlights

ISS Technology Update Volume 7, Number 8 Common SM CLP scripting commands for ProLiant server management This is the first in a series of articles that discuss common SM CLP (Server Management Command Line Protocol) scripting commands. SM CLP is one of the communication, or access, protocols that can be used with the Systems Management Architecture for Server Hardware (SMASH). Some customers want to use scripts to perform basic target operations on ProLiant servers (for instance, powering on or powering off the server, or obtaining event logs). From a Windows or Linux client, administrators can use SM CLP to remotely interrogate and control servers using the Integrated Lights-Out 2 (iLO 2) processor. SMASH/CLP is accessed using Secure Shell (SSH). SSH can be interactive (as in a shell) or it can execute in a "command" mode by processing a single command at a time. The following examples demonstrate SSH command mode using Plink, a Windows utility that provides SSH command line support. Plink and PuTTY executables, source code, and license terms are freely distributed on the web. Other SSH command line utilities should support this functionality in a similar manner. The following examples specify user credentials on the command line. If user credentials are not specified, iLO 2 prompts for account credentials, interrupting the process. iLO 2 also supports SSH key-based authentication. Check the power status of the machine The "show system1" command returns the property "enabledstate" as the power state in SM CLP terminology. C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net show system1 enabledstate | grep enabledstate show system1 enabledstate enabledstate=enabled Power-on the server If the server is off, the "start system1" command issues a virtual power button press. C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net start system1 start system1 status=0 status_tag=COMMAND COMPLETED Server power on. hpiLO-> Power-off the server If the server is on, the "stop system1" command issues a virtual power button press. This event is normally intercepted by the OS ACPI support to initiate a graceful shutdown. It may be ignored if the OS is configured to ignore graceful shutdown requests, if the OS is hung up, or if an OS driver is waiting on a completion status. If this is the case, then the "-force" parameter can be used to cause a hard shutdown. C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net stop system1 stop system1 5

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

ISS Technology Update
Volume 7, Number 8
5
Common SM CLP scripting commands for ProLiant server management
This is the first in a series of articles that discuss common SM CLP (Server Management Command Line Protocol) scripting
commands. SM CLP is one of the communication, or access, protocols that can be used with the Systems Management
Architecture for Server Hardware (SMASH
)
.
Some customers want to use scripts to perform basic target operations on ProLiant servers (for instance, powering on or
powering off the server, or obtaining event logs). From a Windows or Linux client, administrators can use SM CLP to remotely
interrogate and control servers using the Integrated Lights-Out 2 (iLO 2) processor.
SMASH/CLP is accessed using Secure Shell (SSH). SSH can be interactive (as in a shell) or it can execute in a "command"
mode by processing a single command at a time. The following examples demonstrate SSH command mode using Plink, a
Windows utility that provides SSH command line support. Plink and PuTTY executables, source code, and license terms are
freely distributed on the web. Other SSH command line utilities should support this functionality in a similar manner.
The following examples specify user credentials on the command line. If user credentials are not specified, iLO 2 prompts for
account credentials, interrupting the process. iLO 2 also supports SSH key-based authentication.
Check the power status of the machine
The "
show system1
" command returns the property “
enabledstate”
as the power state in SM CLP terminology.
C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net show system1
enabledstate | grep
enabledstate
show system1 enabledstate
enabledstate=enabled
Power-on the server
If the server is off, the "
start system1
" command issues a virtual power button press.
C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net start system1
start system1
status=0
status_tag=COMMAND COMPLETED
Server power on.
</>hpiLO->
Power-off the server
If the server is on, the "
stop system1
" command issues a virtual power button press. This event is normally intercepted by the
OS ACPI support to initiate a graceful shutdown. It may be ignored if the OS is configured to ignore graceful shutdown
requests, if the OS is hung up, or if an OS driver is waiting on a completion status. If this is the case, then the “
-force
parameter can be used to cause a hard shutdown.
C:\putty>plink -ssh -l admin -pw password ilo2system.corp.net stop system1
stop system1