System information

350 Logical Partitions on System i5
11.4 Running DLPAR scripts from i5/OS
Once you logon to the HMC from i5/OS, all the HMC commands are available to use. You can
use these commands to do DLPAR functions. Also, you can write the scripts to run the
specific tasks and schedule the script to run from i5/OS. Scripts can be written from the
desktop PC, and using the operation navigator, drag and drop them to the desired IFS
directory (for example, /home/fred) in i5/OS.
To schedule the scripts from the i5/OS, you need to run the commands from the QSHELL
instead of QP2TERM.
The QSHELL environment does not have the PATH for qsh. You need to add the qsh
command path to the QSHELL environment. The following steps show how to execute the
HMC commands from QSHELL.
򐂰 Logon as
fred from i5/OS and run the command strqsh (Figure 11-17).
Figure 11-16 strqsh
To run the ssh command, a path needs to be added.You can see that the following script
contains the path for the ssh. You can write the script from a Windows workstation and then
copy it to the IFS folder (for example, /home/fred), or, from the i5/OS, use the command edtf.
You can run the script systemname as shown in Example 11-1 and Figure 11-17.
Example 11-1 Systemname
PATH=$PATH:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
ssh -T 9.5.92.92 lssyscfg -r sys -F name
In this script example, the first line will add the ssh path and the second line will execute the
ssh command and logon to the HMC (ip address 9.5.92.92) and then execute the command:
lssyscfg -r sys -F name
Note: This path need to be added to the scripts to execute the ssh command:
PATH=$PATH:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin