2008-04-10 21:06:26 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
|
|
|
|
package xCAT::Usage;
|
2008-04-12 14:53:11 +00:00
|
|
|
use Getopt::Long;
|
2008-07-07 19:04:37 +00:00
|
|
|
use xCAT::Utils;
|
2008-04-10 21:06:26 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
=head1 xCAT::Usage
|
|
|
|
=head2 Package Description
|
|
|
|
xCAT usage module. Some commands such as rpower have different implementations
|
2008-10-22 15:56:46 +00:00
|
|
|
for different hardware. This module holds the usage string for these kind
|
2008-04-10 21:06:26 +00:00
|
|
|
of commands so that the usage can be referenced from different modules.
|
|
|
|
=cut
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
my %usage = (
|
2008-04-12 14:53:11 +00:00
|
|
|
"rnetboot" =>
|
2011-04-20 09:52:33 +00:00
|
|
|
"Usage: rnetboot <noderange> [-s net|hd] [-F] [-f] [-V|--verbose] [-m table.colum==expectedstatus] [-m table.colum==expectedstatus...] [-r <retrycount>] [-t <timeout>]
|
2008-04-12 14:53:11 +00:00
|
|
|
rnetboot [-h|--help|-v|--version]",
|
|
|
|
"rpower" =>
|
2010-03-26 14:01:48 +00:00
|
|
|
"Usage: rpower <noderange> [--nodeps] [on|onstandby|off|suspend|reset|stat|state|boot] [-V|--verbose] [-m table.colum==expectedstatus][-m table.colum==expectedstatus...] [-r <retrycount>] [-t <timeout>]
|
2008-10-06 16:06:34 +00:00
|
|
|
rpower [-h|--help|-v|--version]
|
2009-03-17 00:49:55 +00:00
|
|
|
KVM Virtualization specific:
|
|
|
|
rpower <noderange> [boot] [ -c <path to iso> ]
|
2008-10-06 16:06:34 +00:00
|
|
|
PPC (with IVM or HMC) specific:
|
|
|
|
rpower <noderange> [--nodeps] [of] [-V|--verbose]
|
2009-03-05 03:21:20 +00:00
|
|
|
PPC (HMC) specific:
|
|
|
|
rpower <noderange> [onstandby] [-V|--verbose]
|
2011-06-21 01:28:59 +00:00
|
|
|
CEC(using Direct FSP Management) specific:
|
2011-06-24 09:31:41 +00:00
|
|
|
rpower <noderange> [on|onstandby|off|stat|state|lowpower|resetsp]
|
2011-06-21 01:28:59 +00:00
|
|
|
Frame(using Direct FSP Management) specific:
|
2011-06-24 09:31:41 +00:00
|
|
|
rpower <noderange> [stat|state|rackstandby|exit_rackstandby|resetsp]
|
2011-06-21 01:28:59 +00:00
|
|
|
LPAR(using Direct FSP Management) specific:
|
|
|
|
rpower <noderange> [on|off|reset|stat|state|boot|of|sms]
|
2009-05-12 05:56:45 +00:00
|
|
|
Blade specific:
|
|
|
|
rpower <noderange> [cycle|softoff] [-V|--verbose]
|
2008-10-06 16:06:34 +00:00
|
|
|
",
|
2008-04-12 14:53:11 +00:00
|
|
|
"rbeacon" =>
|
|
|
|
"Usage: rbeacon <noderange> [on|off|stat] [-V|--verbose]
|
|
|
|
rbeacon [-h|--help|-v|--version]",
|
|
|
|
"rvitals" =>
|
2009-05-26 05:02:23 +00:00
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
rvitals [-h|--help|-v|--version]
|
2011-03-18 06:15:35 +00:00
|
|
|
FSP/LPAR (with HMC) specific:
|
2009-05-26 05:02:23 +00:00
|
|
|
rvitals noderange {temp|voltage|lcds|all}
|
2011-07-20 07:30:26 +00:00
|
|
|
CEC/LPAR/Frame (using Direct FSP Management)specific:
|
|
|
|
rvitals noderange {rackenv|lcds|all}
|
2009-05-26 05:02:23 +00:00
|
|
|
MPA specific:
|
|
|
|
rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|summary|all}
|
|
|
|
Blade specific:
|
|
|
|
rvitals noderange {temp|wattage|fanspeed|leds|summary|all}
|
|
|
|
BMC specific:
|
|
|
|
rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|lcds|summary|all}",
|
2008-04-12 14:53:11 +00:00
|
|
|
"reventlog" =>
|
|
|
|
"Usage: reventlog <noderange> [all|clear|<number of entries to retrieve>] [-V|--verbose]
|
|
|
|
reventlog [-h|--help|-v|--version]",
|
|
|
|
"rinv" =>
|
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
rinv <noderange> [all|model|serial] [-V|--verbose]
|
|
|
|
rinv [-h|--help|-v|--version]
|
|
|
|
BMC specific:
|
|
|
|
rinv <noderange> [vpd|mprom|deviceid|uuid|guid]
|
|
|
|
MPA specific:
|
|
|
|
rinv <noderange> [firm|bios|diag|mprom|sprom|mparom|mac|mtm]
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC specific(with HMC):
|
2009-11-04 03:43:59 +00:00
|
|
|
rinv <noderange> [bus|config|serial|model|firm|all]
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC specific(using Direct FSP Management):
|
2011-04-08 05:32:47 +00:00
|
|
|
rinv <noderange> [firm|deconfig]
|
2009-11-04 03:43:59 +00:00
|
|
|
Blade specific:
|
2010-06-10 14:53:05 +00:00
|
|
|
rinv <noderange> [mtm|serial|mac|bios|diag|mprom|mparom|firm|all]
|
|
|
|
VMware specific:
|
|
|
|
rinv <noderange>",
|
2008-04-12 14:53:11 +00:00
|
|
|
"rsetboot" =>
|
2008-07-14 15:33:06 +00:00
|
|
|
"Usage: rsetboot <noderange> [net|hd|cd|floppy|def|stat] [-V|--verbose]
|
2008-04-12 14:53:11 +00:00
|
|
|
rsetboot [-h|--help|-v|--version]",
|
|
|
|
"rbootseq" =>
|
2011-03-18 06:15:35 +00:00
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
rbootseq [-h|--help|-v|--version]
|
|
|
|
Blade specific:
|
|
|
|
rbootseq <noderange> [hd0|hd1|hd2|hd3|net|iscsi|usbflash|floppy|none],...
|
|
|
|
PPC (using Direct FSP Management) specific:
|
|
|
|
rbootseq <noderange> [hfi|net]",
|
2008-04-12 14:53:11 +00:00
|
|
|
"rscan" =>
|
2009-11-19 09:48:37 +00:00
|
|
|
"Usage: rscan <noderange> [-u][-w][-x|-z] [-V|--verbose]
|
2008-04-12 14:53:11 +00:00
|
|
|
rscan [-h|--help|-v|--version]",
|
2008-04-10 21:06:26 +00:00
|
|
|
"rspconfig" =>
|
|
|
|
"Usage:
|
|
|
|
Common:
|
2008-05-20 18:57:12 +00:00
|
|
|
rspconfig [-h|--help|-v|--version]
|
|
|
|
BMC/MPA Common:
|
2008-04-12 14:53:11 +00:00
|
|
|
rspconfig <noderange> [snmpdest|alert|community] [-V|--verbose]
|
2008-04-10 21:06:26 +00:00
|
|
|
rspconfig <noderange> [snmpdest=<dest ip address>|alert=<on|off|en|dis|enable|disable>|community=<string>]
|
|
|
|
BMC specific:
|
|
|
|
rspconfig <noderange> [ip|netmask|gateway|backupgateway|garp]
|
|
|
|
rspconfig <noderange> [garp=<number of 1/2 second>]
|
2008-06-10 15:32:14 +00:00
|
|
|
iDataplex specific:
|
|
|
|
rspconfig <noderange> [thermprofile]
|
|
|
|
rspconfig <noderange> [thermprofile=<two digit number from chassis>]
|
2008-04-10 21:06:26 +00:00
|
|
|
MPA specific:
|
2009-09-02 16:54:17 +00:00
|
|
|
rspconfig <noderange> [sshcfg|snmpcfg|pd1|pd2|network|swnet|ntp|textid|frame]
|
2008-05-20 18:57:12 +00:00
|
|
|
rspconfig <singlenode> [textid=name]
|
2009-09-02 16:54:17 +00:00
|
|
|
rspconfig <singlenode> [frame=number]
|
2008-05-27 14:29:01 +00:00
|
|
|
rspconfig <noderange> [sshcfg=<enable|disable>|
|
2008-04-21 13:40:51 +00:00
|
|
|
snmpcfg=<enable|disable>|
|
|
|
|
pd1=<nonred|redwoperf|redwperf>|
|
|
|
|
pd2=<nonred|redwoperf|redwperf>|
|
2008-04-22 19:28:29 +00:00
|
|
|
network=<*|[ip],[host],[gateway],[netmask]>|
|
|
|
|
swnet=<[ip],[gateway],[netmask]>|
|
2008-05-20 18:57:12 +00:00
|
|
|
textid=<*>|
|
2009-09-02 16:54:17 +00:00
|
|
|
frame=<*>|
|
2009-12-31 04:46:42 +00:00
|
|
|
ntp=<[ntp],[ip],[frequency],[v3]>
|
2010-03-04 09:38:44 +00:00
|
|
|
FSP/BPA Common:
|
|
|
|
rspconfig <noderange> [autopower|iocap|decfg|memdecfg|procdecfg|time|date|spdump|sysdump|network|hostname]
|
2008-04-21 13:40:51 +00:00
|
|
|
rspconfig <noderange> autopower=<enable|disable>|
|
|
|
|
iocap=<enable|disable>|
|
|
|
|
decfg=<enable|disable>:<policy name>,...|
|
|
|
|
memdecfg=<configure|deconfigure>:<processing unit>:<bank|unit>:<bank/unit number>:id,...|
|
|
|
|
procdecfg=<configure|deconfigure>:<processing unit>:id,...|
|
|
|
|
date=<mm-dd-yyyy>|
|
2010-03-04 09:38:44 +00:00
|
|
|
time=<hh:mm:ss>|
|
|
|
|
network=<*|[ip],[host],[gateway],[netmask]>|
|
|
|
|
HMC_passwd=<currentpasswd,newpasswd>|
|
|
|
|
admin_passwd=<currentpasswd,newpasswd>|
|
|
|
|
general_passwd=<currentpasswd,newpasswd>|
|
|
|
|
*_passwd=<currentpasswd,newpasswd>|
|
|
|
|
hostname=<*|hostname>
|
2011-06-29 06:27:13 +00:00
|
|
|
FSP/CEC (using Direct FSP Management) Specific:
|
2011-08-22 02:24:18 +00:00
|
|
|
rspconfig <noderange> HMC_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> admin_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> general_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> *_passwd=<currentpasswd,newpasswd>
|
2011-06-29 06:27:13 +00:00
|
|
|
rspconfig <noderange> [sysname]
|
|
|
|
rspconfig <noderange> [sysname=<*|name>]
|
2011-07-27 09:11:37 +00:00
|
|
|
rspconfig <noderange> [pending_power_on_side]
|
|
|
|
rspconfig <noderange> [pending_power_on_side=<temp|perm>]
|
2011-06-29 06:27:13 +00:00
|
|
|
rspconfig <noderange> [cec_off_policy]
|
|
|
|
rspconfig <noderange> [cec_off_policy=<poweroff|stayon>]
|
2011-08-22 02:24:18 +00:00
|
|
|
rspconfig <noderange> --resetnet
|
2011-06-29 06:27:13 +00:00
|
|
|
BPA/Frame (using Direct FSP Management)specific:
|
2011-08-22 02:24:18 +00:00
|
|
|
rspconfig <noderange> HMC_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> admin_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> general_passwd=<currentpasswd,newpasswd>
|
|
|
|
rspconfig <noderange> *_passwd=<currentpasswd,newpasswd>
|
2010-03-04 09:38:44 +00:00
|
|
|
rspconfig <noderange> [frame]
|
|
|
|
rspconfig <noderange> frame=<*|frame>
|
2011-06-29 06:27:13 +00:00
|
|
|
rspconfig <noderange> [sysname]
|
|
|
|
rspconfig <noderange> [sysname=<*|name>]
|
2011-07-27 09:11:37 +00:00
|
|
|
rspconfig <noderange> [pending_power_on_side]
|
|
|
|
rspconfig <noderange> [pending_power_on_side=<temp|perm>]
|
2011-08-22 02:24:18 +00:00
|
|
|
rspconfig <noderange> --resetnet
|
2009-02-17 12:59:50 +00:00
|
|
|
HMC specific:
|
2010-03-04 09:38:44 +00:00
|
|
|
rspconfig <noderange> [sshcfg]
|
2011-06-17 07:29:17 +00:00
|
|
|
rspconfig <noderange> [sshcfg=<enable|disable>]
|
2011-07-12 06:10:19 +00:00
|
|
|
CEC|Frame(using ASM)Specific:
|
2011-06-17 07:29:17 +00:00
|
|
|
rspconfig <noderange> [dev|celogin1]
|
|
|
|
rspconfig <noderange> [dev=<enable|disable>]|
|
|
|
|
rspconfig <noderange> [celogin1=<enable|disable>]
|
|
|
|
",
|
2008-04-12 14:53:11 +00:00
|
|
|
"getmacs" =>
|
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
getmacs [-h|--help|-v|--version]
|
|
|
|
PPC specific:
|
2009-06-05 09:06:07 +00:00
|
|
|
getmacs <noderange> [-F filter]
|
2011-04-20 09:52:33 +00:00
|
|
|
getmacs <noderange> [-V| --verbose] [-f] [-d] [--arp] | [-D [-S server] [-G gateway] [-C client]]
|
2010-02-04 10:24:13 +00:00
|
|
|
blade specific:
|
|
|
|
getmacs <noderange> [-V| --verbose] [-d] [--arp]
|
|
|
|
",
|
2008-04-12 14:53:11 +00:00
|
|
|
"mkvm" =>
|
2009-04-06 18:52:35 +00:00
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
mkvm [-h|--help|-v|--version]
|
2011-03-18 06:15:35 +00:00
|
|
|
For PPC(with HMC):
|
2009-04-06 18:52:35 +00:00
|
|
|
mkvm noderange -i id -l singlenode [-V|--verbose]
|
|
|
|
mkvm noderange -c destcec -p profile [-V|--verbose]
|
2009-12-31 04:46:42 +00:00
|
|
|
mkvm noderange --full [-V|--verbose]
|
2009-04-06 18:52:35 +00:00
|
|
|
For KVM
|
|
|
|
mkvm noderange -m|--master mastername -s|--size disksize -f|--force",
|
2008-04-12 14:53:11 +00:00
|
|
|
"lsvm" =>
|
2008-11-04 01:45:46 +00:00
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
lsvm <noderange> [-V|--verbose]
|
|
|
|
lsvm [-h|--help|-v|--version]
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (with HMC) specific:
|
|
|
|
lsvm <noderange> [-a|--all]
|
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-07-25 03:40:30 +00:00
|
|
|
lsvm <noderange> [-l|--long]",
|
2008-04-12 14:53:11 +00:00
|
|
|
"chvm" =>
|
2010-06-10 14:53:05 +00:00
|
|
|
"Usage:
|
|
|
|
Common:
|
2009-04-16 10:09:49 +00:00
|
|
|
chvm [-h|--help|-v|--version]
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (with HMC) specific:
|
2010-06-10 14:53:05 +00:00
|
|
|
chvm <noderange> [-p profile][-V|--verbose]
|
|
|
|
chvm <noderange> <attr>=<val> [<attr>=<val>...]
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-04-06 06:56:03 +00:00
|
|
|
chvm <noderange> [-p <profile>]
|
2011-07-25 03:40:30 +00:00
|
|
|
chvm <noderange> [lparname=<*|name>]
|
2011-04-06 06:56:03 +00:00
|
|
|
chvm <noderange> -i <id> [-m <memory_interleaving>] -r <partition_rule>
|
2010-06-10 14:53:05 +00:00
|
|
|
VMware specific:
|
|
|
|
chvm <noderange> [-a size][-d disk][-p disk][--resize disk=size][--cpus count][--mem memory]",
|
2008-04-12 14:53:11 +00:00
|
|
|
"rmvm" =>
|
2010-01-04 03:55:09 +00:00
|
|
|
"Usage: rmvm <noderange> [--service][-V|--verbose]
|
2011-06-23 13:25:26 +00:00
|
|
|
rmvm [-h|--help|-v|--version],
|
|
|
|
rmvm [-p] [-f]",
|
2008-06-17 13:48:08 +00:00
|
|
|
"lsslp" =>
|
|
|
|
"Usage: lsslp [-h|--help|-v|--version]
|
2011-05-09 03:30:44 +00:00
|
|
|
lsslp [<noderange>][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC][-C counts][-T timeout]
|
2010-12-29 10:41:44 +00:00
|
|
|
[-t tries][-m][-e cmd][-c [timeinterval[interval,..]]][--vpdtable]
|
2010-02-08 15:56:18 +00:00
|
|
|
[-M vpd|switchport][--makedhcp][--updatehost][--resetnet]",
|
2009-01-06 11:10:15 +00:00
|
|
|
"rflash" =>
|
2011-03-18 06:15:35 +00:00
|
|
|
"Usage:
|
|
|
|
rflash [ -h|--help|-v|--version]
|
|
|
|
PPC (with HMC) specific:
|
2011-08-10 07:00:18 +00:00
|
|
|
rflash <noderange> -p <rpm_directory> [--activate concurrent | disruptive][-V|--verbose]
|
2011-03-18 06:15:35 +00:00
|
|
|
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-08-10 07:00:18 +00:00
|
|
|
rflash <noderange> -p <rpm_directory> --activate disruptive [-d <data_directory>]
|
2009-05-20 09:04:19 +00:00
|
|
|
rflash <noderange> [--commit | --recover] [-V|--verbose]",
|
2009-08-04 20:28:03 +00:00
|
|
|
"mkhwconn" =>
|
2009-05-20 09:04:19 +00:00
|
|
|
"Usage:
|
2009-08-04 20:28:03 +00:00
|
|
|
mkhwconn [-h|--help]
|
2010-12-20 06:02:07 +00:00
|
|
|
|
|
|
|
PPC (with HMC) specific:
|
2009-08-04 20:28:03 +00:00
|
|
|
mkhwconn noderange -t [--bind] [-V|--verbose]
|
2010-12-20 06:02:07 +00:00
|
|
|
mkhwconn noderange -p single_hmc [-P HMC passwd] [-V|--verbose]
|
|
|
|
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-06-21 07:32:16 +00:00
|
|
|
mkhwconn noderange -t [-T tooltype] [--port port_value]
|
|
|
|
mkhwconn noderange -s [hmcnode] [-P HMC passwd] [-V|--verbose]",
|
2009-08-04 20:28:03 +00:00
|
|
|
"rmhwconn" =>
|
2009-05-26 06:02:03 +00:00
|
|
|
"Usage:
|
2009-08-04 20:28:03 +00:00
|
|
|
rmhwconn [-h|--help]
|
2010-12-20 06:02:07 +00:00
|
|
|
|
|
|
|
PPC (with HMC) specific:
|
|
|
|
rmhwconn noderange [-V|--verbose]
|
|
|
|
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-06-21 07:32:16 +00:00
|
|
|
rmhwconn noderange [-T tooltype]
|
|
|
|
rmhwconn noderange -s",
|
2009-08-04 20:28:03 +00:00
|
|
|
"lshwconn" =>
|
2009-05-26 06:02:03 +00:00
|
|
|
"Usage:
|
2009-08-04 20:28:03 +00:00
|
|
|
lshwconn [-h|--help]
|
2010-12-20 06:02:07 +00:00
|
|
|
|
|
|
|
PPC (with HMC) specific:
|
|
|
|
lshwconn noderange [-V|--verbose]
|
|
|
|
|
2011-03-18 06:15:35 +00:00
|
|
|
PPC (using Direct FSP Management) specific:
|
2011-06-21 07:32:16 +00:00
|
|
|
lshwconn noderange [-T tooltype]
|
|
|
|
lshwconn noderange -s",
|
2009-09-21 06:33:27 +00:00
|
|
|
"renergy" =>
|
|
|
|
"Usage:
|
2010-01-30 14:35:01 +00:00
|
|
|
renergy [-h | --help]
|
|
|
|
renergy [-v | --version]
|
|
|
|
|
|
|
|
Power 6 server specific :
|
|
|
|
renergy noderange [-V] { all | { [savingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] } }
|
|
|
|
renergy noderange [-V] { {savingstatus}={on | off} | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
|
|
|
|
|
|
|
|
Power 7 server specific :
|
2011-06-27 15:10:15 +00:00
|
|
|
renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue] } }
|
|
|
|
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {fsavingstatus}={on | off} | {ffovalue}=MHZ | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
|
2010-04-20 09:34:48 +00:00
|
|
|
|
|
|
|
Blade specific :
|
|
|
|
renergy noderange [-V] { all | pd1all | pd2all | { [pd1status] [pd2status] [pd1policy] [pd2policy] [pd1powermodule1] [pd1powermodule2] [pd2powermodule1] [pd2powermodule2] [pd1avaiablepower] [pd2avaiablepower] [pd1reservedpower] [pd2reservedpower] [pd1remainpower] [pd2remainpower] [pd1inusedpower] [pd2inusedpower] [availableDC] [averageAC] [thermaloutput] [ambienttemp] [mmtemp] } }
|
2010-09-25 03:00:54 +00:00
|
|
|
renergy noderange [-V] { all | { [averageDC] [capability] [cappingvalue] [CPUspeed] [maxCPUspeed] [savingstatus] [dsavingstatus] } }
|
2010-08-24 07:33:32 +00:00
|
|
|
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} }",
|
2010-03-21 13:11:47 +00:00
|
|
|
"updatenode" =>
|
|
|
|
"Usage:
|
|
|
|
updatenode [-h|--help|-v|--version]
|
|
|
|
or
|
2010-03-24 12:05:58 +00:00
|
|
|
updatenode <noderange> [-V|--verbose] [-k|--security] [-s|--sn]
|
2010-03-21 13:11:47 +00:00
|
|
|
or
|
2010-03-24 12:05:58 +00:00
|
|
|
updatenode <noderange> [-V|--verbose] [-k|--security] [--user]
|
2010-03-21 13:11:47 +00:00
|
|
|
[--devicetype]
|
|
|
|
or
|
2011-05-13 13:27:22 +00:00
|
|
|
updatenode <noderange> [-V|--verbose] [-F|--sync | -f|--snsync] [-S|--sw]
|
2010-03-25 18:09:59 +00:00
|
|
|
[-P|--scripts [script1,script2,...]] [-s|--sn]
|
|
|
|
[-A|--updateallsw] [-c|--cmdlineonly] [-d alt_source_dir]
|
2010-03-21 13:11:47 +00:00
|
|
|
[attr=val [attr=val...]]
|
|
|
|
or
|
|
|
|
updatenode <noderange> [-V|--verbose] [script1,script2,...]
|
2010-03-25 18:09:59 +00:00
|
|
|
|
|
|
|
Options:
|
|
|
|
<noderange> A list of nodes or groups.
|
|
|
|
|
|
|
|
[-k|--security] Update the security keys and certificates for the
|
|
|
|
target nodes.
|
|
|
|
|
|
|
|
[-k|--security] [--user] [--devicetype] Update the ssh keys for
|
|
|
|
specific device.
|
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[-F|--sync] Perform File Syncing.
|
2010-03-25 18:09:59 +00:00
|
|
|
|
2011-05-13 13:27:22 +00:00
|
|
|
[-f|--snsync] Performs File Syncing to the service nodes that service
|
|
|
|
the nodes in the noderange.
|
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[-S|--sw] Perform Software Maintenance.
|
2010-03-25 18:09:59 +00:00
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[-P|--scripts] Execute postscripts listed in the postscripts table or
|
|
|
|
parameters.
|
2010-03-25 18:09:59 +00:00
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[-c|--cmdlineonly] Only use AIX software maintenance information
|
|
|
|
provided on the command line. (AIX only)
|
2010-03-25 18:09:59 +00:00
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[-s|--sn] Set the server information stored on the nodes.
|
2010-03-25 18:09:59 +00:00
|
|
|
|
|
|
|
[-A|--updateallsw] Install or update all software contained in the source
|
|
|
|
directory. (AIX only)
|
|
|
|
|
|
|
|
[-d <alt_source_dir>] Used to indicate a source directory other than
|
|
|
|
the standard lpp_source directory specified in the xCAT osimage
|
|
|
|
definition. (AIX only)
|
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[script1,script2,...] A comma separated list of postscript names.
|
|
|
|
If omitted, all the post scripts defined for the nodes will be run.
|
2010-03-25 18:09:59 +00:00
|
|
|
|
2010-03-21 13:11:47 +00:00
|
|
|
[attr=val [attr=val...]] Specifies one or more 'attribute equals value'
|
|
|
|
pairs, separated by spaces. (AIX only)",
|
2010-05-17 11:52:18 +00:00
|
|
|
"lsflexnode" =>
|
|
|
|
"Usage:
|
|
|
|
lsflexnode [-h|--help|-v|--version]
|
|
|
|
lsflexnode <noderange>",
|
|
|
|
"mkflexnode" =>
|
|
|
|
"Usage:
|
|
|
|
mkflexnode [-h|--help|-v|--version]
|
|
|
|
mkflexnode <noderange>",
|
2010-08-12 09:00:31 +00:00
|
|
|
"nodeset" =>
|
|
|
|
"Usage:
|
|
|
|
Common:
|
|
|
|
nodeset [-h|--help|-v|--version]
|
|
|
|
nodeset <noderange> [install|shell|boot|runcmd=bmcsetup|netboot|iscsiboot|osimage=<imagename>|statelite]",
|
2010-05-17 11:52:18 +00:00
|
|
|
"rmflexnode" =>
|
|
|
|
"Usage:
|
|
|
|
rmflexnode [-h|--help|-v|--version]
|
|
|
|
rmflexnode <noderange>",
|
2008-04-12 14:53:11 +00:00
|
|
|
);
|
2008-07-07 19:04:37 +00:00
|
|
|
my $vers = xCAT::Utils->Version();
|
2008-04-12 14:53:11 +00:00
|
|
|
my %version = (
|
2008-07-07 19:04:37 +00:00
|
|
|
"rnetboot" => "$vers",
|
|
|
|
"rpower" => "$vers",
|
|
|
|
"rbeacon" => "$vers",
|
|
|
|
"rvitals" => "$vers",
|
|
|
|
"reventlog" => "$vers",
|
|
|
|
"rinv" => "$vers",
|
|
|
|
"rsetboot" => "$vers",
|
|
|
|
"rbootseq" => "$vers",
|
|
|
|
"rscan" => "$vers",
|
|
|
|
"rspconfig" => "$vers",
|
|
|
|
"getmacs" => "$vers",
|
|
|
|
"mkvm" => "$vers",
|
|
|
|
"lsvm" => "$vers",
|
|
|
|
"chvm" => "$vers",
|
|
|
|
"rmvm" => "$vers",
|
2009-01-06 11:10:15 +00:00
|
|
|
"lsslp" => "$vers",
|
2009-09-21 06:33:27 +00:00
|
|
|
"rflash" => "$vers",
|
2010-05-17 11:52:18 +00:00
|
|
|
"renergy" => "$vers",
|
|
|
|
"lsflexnode" => "$vers",
|
|
|
|
"mkflexnode" => "$vers",
|
|
|
|
"rmflexnode" => "$vers",
|
2010-08-12 09:00:31 +00:00
|
|
|
"nodeset" => "$vers"
|
2008-04-10 21:06:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
=head3 getUsage
|
|
|
|
It returns the usage string for the given command.
|
|
|
|
Arguments:
|
|
|
|
command
|
|
|
|
Returns:
|
|
|
|
the usage string for the command.
|
|
|
|
=cut
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
sub getUsage {
|
|
|
|
my ($class, $command)=@_;
|
|
|
|
if (exists($usage{$command})) { return $usage{$command};}
|
|
|
|
else { return "Usage for command $command cannot be found\n"; }
|
|
|
|
}
|
2008-04-12 14:53:11 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
=head3 getVersion
|
|
|
|
It returns the version string for the given command.
|
|
|
|
Arguments:
|
|
|
|
command
|
|
|
|
Returns:
|
|
|
|
the version string for the command.
|
|
|
|
=cut
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
sub getVersion {
|
|
|
|
my ($class, $command)=@_;
|
|
|
|
if (exists($version{$command})) { return $version{$command};}
|
|
|
|
else { return "Version string for command $command cannot be found\n"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
=head3 parseCommand
|
|
|
|
This function parses the given command to see if the usage or version string
|
|
|
|
need to be returned.
|
|
|
|
Arguments:
|
|
|
|
command
|
|
|
|
arguments
|
|
|
|
Returns:
|
|
|
|
the usage or the version string for the command. The caller need to display the
|
|
|
|
string and then exit.
|
|
|
|
none, if no usage or version strings are needed. The caller can keep going.
|
|
|
|
=cut
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
sub parseCommand {
|
|
|
|
my $command=shift;
|
|
|
|
if ($command =~ /xCAT::Usage/) { $command=shift; }
|
|
|
|
my @exargs=@_;
|
|
|
|
|
|
|
|
@ARGV=@exargs;
|
|
|
|
|
|
|
|
#print "command=$command, args=@exargs, ARGV=@ARGV\n";
|
|
|
|
|
2008-10-22 15:56:46 +00:00
|
|
|
Getopt::Long::Configure('pass_through','no_ignore_case');
|
2008-04-12 14:53:11 +00:00
|
|
|
|
|
|
|
# parse the options
|
|
|
|
if(!GetOptions(
|
|
|
|
'h|help' => \$::HELP,
|
|
|
|
'v|version' => \$::VERSION)) {
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($::HELP) { return xCAT::Usage->getUsage($command); }
|
|
|
|
if ($::VERSION) { return xCAT::Usage->getVersion($command); }
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
2008-04-21 13:40:51 +00:00
|
|
|
|