batch command

Use the batch command to queue ASU operations without any knowledge of the scripting capabilities of the operating system on which the ASU is running.

Syntax

The syntax of the batch command is
asu batch batch_filename [-nx] [connect_options]
where

batch_filename is the name of a file that contains a list of ASU commands.

Notes

  1. If the optional -nx parameter is specified, the ASU performs the operation for node x, where x is the selected node in a multi-node system and is represented by a number from 1 through 8. If the -nx parameter is not specified, the operation is performed on the primary node (node 1).
  2. Do not specify the -nx optional parameter in the batch file for any of the batched commands.
  3. The connect options are defined for IMM-based servers only. The --host ip_address, --user user_id, and --password password connect options are all required if you connect remotely to the IMM. The default user and password will not support an out-of-band connection now. The --mtsn, --net, --user, and --password options can be used to connect to IMM-based servers if the server running ASU and the target IMM-based servers are in one LAN. The --user user_id and --password password connect options are not required if you are using the local KCS interface.
  4. All consecutive set commands in a batch file are set synchronously, and the inconsecutive set command parts are set one by one. If an error occurs in one set command, all consecutive set commands also work, and the commands above the error are set successfully; only those below the error stop working.

Output

When you use the batch command on a batch file, the output that is sent to stdout, and stderr is the collective output of all the commands in the batch file. The output of each command in the batch file is preceded by the command itself, surrounded by brackets ([ ]), as shown in the following example:
[command 1]
output of command 1
[command 2]
output of command 2




[command n]
output of command n

The batch command and corresponding output are shown in the following examples.

Example 1

Batch file:
set IMM.PowerRestorePolicy "Always on"
set IMM.PowerOnAtSpecifiedTime_Hour 05
set IMM.PowerOnAtSpecifiedTime_Minute 00
set IMM.PowerOnAtSpecifiedTime_Second 00
set IMM.ShutdownAndPowerOff_WeekDay Sunday
set IMM.HTTPPort 81
set IMM.SSLPort 441
set IMM.TelnetPort 21
set SYSTEM_PROD_DATA.SysEncloseAssetTag "Server Tag"
set iSCSI.InitiatorName "iqn.2009-01.com.ibm:InitiatorName"
set uEFI.Com1BaudRate 9600
Output:
[set IMM.PowerRestorePolicy "Always on"]
IMM.PowerRestorePolicy=Always on
[set IMM.PowerOnAtSpecifiedTime_Hour 05]
IMM.PowerOnAtSpecifiedTime_Hour=05
[set IMM.PowerOnAtSpecifiedTime_Minute 00]
IMM.PowerOnAtSpecifiedTime_Minute=00
[set IMM.PowerOnAtSpecifiedTime_Second 00]
IMM.PowerOnAtSpecifiedTime_Second=00
[set IMM.ShutdownAndPowerOff_WeekDay Sunday]
IMM.ShutdownAndPowerOff_WeekDay=Sunday
[set IMM.HTTPPort 81]
IMM.HTTPPort=81
[set IMM.SSLPort 441]
IMM.SSLPort=441
[set IMM.TelnetPort 21]
IMM.TelnetPort=21
[set SYSTEM_PROD_DATA.SysEncloseAssetTag "Server Tag"]
SYSTEM_PROD_DATA.SysEncloseAssetTag=Server Tag
[set iSCSI.InitiatorName "iqn.2009-01.com.ibm:InitiatorName"]
iSCSI.InitiatorName=iqn.2009-01.com.ibm:InitiatorName
[set uEFI.Com1BaudRate 9600]
uEFI.Com1BaudRate=9600

Example 2

Batch file:
show CMOS_PrimaryBootDevice1
show CMOS_PrimaryBootDevice2
show CMOS_PrimaryBootDevice3
show CMOS_PrimaryBootDevice4
Output:
[show CMOS_PrimaryBootDevice1]
CMOS_PrimaryBootDevice1=CD ROM
[show CMOS_PrimaryBootDevice2]
CMOS_PrimaryBootDevice2=Diskette Drive 0
[show CMOS_PrimaryBootDevice3]
CMOS_PrimaryBootDevice3=Hard Disk 0
[show CMOS_PrimaryBootDevice4]
CMOS_PrimaryBootDevice4=Network

Example 3

Batch file:
set CMOS_PrimaryBootDevice1 "Network"
set CMOS_PrimaryBootDevice2 "Hard Disk 0"
set CMOS_PrimaryBootDevice3 "Diskette Drive 0"
set CMOS_PrimaryBootDevice4 "CD ROM"
Output:
[set CMOS_PrimaryBootDevice1 "Network"]
CMOS_PrimaryBootDevice1=Network
[set CMOS_PrimaryBootDevice2 "Hard Disk 0"]
CMOS_PrimaryBootDevice2=Hard Disk 0
[set CMOS_PrimaryBootDevice3 "Diskette Drive 0"]
CMOS_PrimaryBootDevice3=Diskette Drive 0
[set CMOS_PrimaryBootDevice4]
CMOS_PrimaryBootDevice4=CD ROM 
{set CMOS_PrimaryBootDevice1]
CMOS_PrimaryBootDevice1=CD ROM
[show CMOS_PrimaryBootDevice2]
CMOS_PrimaryBootDevice2=Diskette Drive 0
[show CMOS_PrimaryBootDevice3]
CMOS_PrimaryBootDevice3=Hard Disk 0
[show CMOS_PrimaryBootDevice4]
CMOS_PrimaryBootDevice4=Network