drd-runcmd - Hewlett Packard Enterprise Support Center

advertisement
drd-runcmd(1M)
drd-runcmd(1M)
NAME
drd runcmd - run a command on the inactive system image that will not make any changes to the booted
system, the kernel, or the process space.
SYNOPSIS
drd runcmd
[-?]
[-q] [-v] [-x option=value] [-x -?]
[-X option_file ] cmd <args>
DESCRIPTION
The drd runcmd mode runs a command on the inactive system image that will not make any changes to
the booted system, the kernel, or the process space.
The drd runcmd command enables an administrator to make changes to the inactive system image
without incurring any disruption to the currently booted system. This means that not all commands can
safely be executed by the drd runcmd operation. For example, commands that start or stop daemons or
change dynamic kernel tunables are disruptive to current processes and must be prevented by the
drd runcmd operation.
Commands which are not disruptive to the booted system and which perform appropriate actions on the
inactive system are known as DRD-Safe. A short list of commands is recognized by the drd runcmd
operation to be DRD-Safe. An attempt to use DRD to run commands that are not DRD-Safe will terminate with an ERROR return code without executing the command. The DRD-Safe commands are listed
below under the cmd parameter.
Options
drd runcmd recognizes the following options:
-?
Displays the usage message.
-q
Decreases the verbosity level by one each time it is specified. For example, -qq will reduce the
verbosity from the default value of 4 to 2. If both -x verbosity=5 and -qqq are included on
the command line, the effective verbosity is 2. The minimum verbosity level is 0. (See also the
-x verbosity option).
-v
Increases the verbosity level by one each time it is specified. For example, -v will increase the
effective verbosity from the default value of 4 to 5. If both -x verbosity=1 and -vv are
included on the command line, the effective verbosity is 3. The maximum verbosity level is 5.
(See also the -x verbosity option).
-x -? Displays the list of possible -x (extended) options.
-x option=value
Sets the extended option to a value. See Extended -x Options definitions below.
-X option_file
Gets the extended options from a file.
cmd <args>
Specifies the DRD-Safe command to be run. The value of cmd must be one of the following
HP-UX 11i Version 3: September 2010
−1−
Hewlett-Packard Company
1
A
dA
drd-runcmd(1M)
drd-runcmd(1M)
cmd
kcmodule
kconfig
kctune
mk_kernel
swinstall
swjob
swm job
A
dA
swlist
swmodify
swremove
swverify
view
update-ux
Description
Manage kernel modules and subsystems.
Manage kernel configurations.
Manage kernel tunable parameters.
Load a kernel configuration from a
system file.
Install software products and patches
that are DRD safe.
Display job information
Display job information after running
update-ux through drd. To use this
command you must also specify list,
log or status:
list - List jobs
log - Display the log of a job
status - Display the status of a job
Display information about software
products and patches.
Modify software products and patches.
Remove software products and patches.
Verify software products and patches.
Read files on the inactive image.
Update software products and patches
that are DRD safe from 11iv3 initial
release, update 1, update 2, or update
3, to 11iv3 update 4.
Extended -x Options
drd runcmd recognizes the following -x (extended) options:
-x logfile=/var/opt/drd/drd.log
Usage: Basic
This is the path to the log file for this command. Each time DRD is run, this file will grow larger.
This can be changed, for example, to a month-specific location for easier archiving, off-host backup,
and rotation.
-x log_verbosity=4
Usage: Basic
Specifies the level of message verbosity in the log file (See also -x verbosity). Legal values are:
0
1
2
3
4
5
Only ERROR messages and the starting/ending BANNER messages.
Adds WARNING messages.
Adds NOTE messages.
Adds INFO messages (informational messages preceded by the * character).
Adds verbose INFO messages.
Adds very-verbose INFO messages.
-x verbosity=3
Usage: Basic
Specifies the level of stderr verboseness:
0
1
2
3
4
5
Only ERROR messages and the starting/ending BANNER messages.
Adds WARNING messages.
Adds NOTE messages.
Adds INFO messages (informational messages preceded by the * character).
Adds verbose INFO messages.
Adds very-verbose INFO messages.
Note: The -v option is equivalent to increasing verbosity by 1 (e.g., from 3 to 4) and the -q option
is equivalent to decreasing verbosity by 1. The -v and -q options can be used more than once.
Restrictions on commands executed by runcmd
When calling swinstall and update-ux, drd runcmd supports installation from directory depots
on the booted system and on remote servers. Note that installing or updating from serial depots or from
depots on the inactive system image is not supported.
2
Hewlett-Packard Company
−2−
HP-UX 11i Version 3: September 2010
drd-runcmd(1M)
drd-runcmd(1M)
drd runcmd can also be used to swlist, swverify, swremove, and swmodify software that is
installed on the inactive image. It cannot be used to list or modify any depot’s contents. Using these commands outside of drd runcmd allows for depot listing and management.
Syntax Restrictions for sw* Commands
Since depot manipulation is not supported under drd runcmd, any option that indicates a depot target
is not supported. This includes the following:
-d on swlist, swmodify, swverify, and swremove.
@ options on swinstall, swlist, swverify.
Any double quotation marks (") or wild cards (* or ?) in the command line of the command to be run must
be escaped to prevent inappropriate shell expansion or truncation of the command.
Any file referenced by the command line, that is, the argument of the view command and any argument
of any of the options -c, -f -P, -S, -X, -x logfile, or -x patch_filter, must reside on the inactive system
image and must be designated by the path it would have if the inactive image were booted. This is the
same as its path relative to the mount point of a mounted inactive image.
For example, the location that will be /var/opt/list when the image is booted is either
/var/opt/drd/mnts/sysimage_001/var/opt/list
or
/var/opt/drd/mnts/sysimage_000/var/opt/list when the inactive image is mounted. If this
file is an argument of one of the options listed above, it should be specified as simply /var/opt/list.
This restriction also applies to the arguments of -x logfile and -x patch_filter that appear in a file that is
the argument of the -X option, and to paths that appear in a file that is the argument of a -S option.
Note that this restriction does NOT apply to local directory depots, which must reside on the booted system, and be designated by their location on the booted system.
The following (rare) options of sw* commands are not supported by drd runcmd:
Option
Notes
-c
Specification of a catalog is not supported.
-d
Depot targets are not supported by drd runcmd. (See discussion above.)
-F
Execution of fix scripts is not supported by drd runcmd.
-J
Scheduling of jobs is not supported by drd runcmd.
-Q
Scheduling of jobs is not supported by drd runcmd.
-r
Installation to SD-style alternate roots is not supported by
drd runcmd.
-t
The inactive system image is always the target in a drd
runcmd operation.
-x admin_dir
Non-standard IPD locations are not supported by drd
runcmd.
-x agent_auto_exit
Non-standard IPD locations are not supported by drd
runcmd.
-x ask
Use of response files is not supported by drd runcmd.
-x auto_kernel_build
Regardless of the value of this option, a swremove executed
by drd runcmd builds the kernel for the next boot.
-x autoreboot
Regardless of the value of this option, drd
suppresses all reboots.
-x controller_source
This option is not supported by drd runcmd.
runcmd
-x distribution_source_directory
This option is not supported by drd runcmd.
-x distribution_target_directory
This option is not supported by drd runcmd.
HP-UX 11i Version 3: September 2010
−3−
Hewlett-Packard Company
3
A
dA
drd-runcmd(1M)
A
dA
drd-runcmd(1M)
-x force_single_target
This option is obsolete and is not supported by drd runcmd.
-x mount_all_filesystems
This option defaults to false in a drd runcmd operation. If it
is set to true on the command line, the operation will probably
not succeed.
-x rpc_binding_info_target
This operation is ignored for drd runcmd operations.
-x remove_empty_depot
Operations targeted at depots are not supported by drd
runcmd.
-x un_as_superuser
This option is not meaningful for drd runcmd, since it must
be run as root.
-x select_local
This option is not supported by drd runcmd.
-x source_tape
Tape depots are not supported by drd runcmd.
-x target_shared_root
This option is obsolete and is not supported by drd runcmd.
-x targets
This option is not supported by drd runcmd. The target is
always the inactive system image.
-x use_alternate_source
This option is obsolete and is not supported by drd runcmd.
RETURN VALUE
drd runcmd returns the following values:
0
1
2
Success.
Error.
Warning.
EXAMPLES
To name a file specifying extended options:
drd <mode> [options] -X /tmp/extendedOptions
where the example /tmp/extendedOptions file has this content:
logfile=/tmp/robsDRD.log
log_verbosity=5
To perform a preview of an update to 0903 HPUX11i-DC-OE on the inactive system image from the depot
/var/opt/1131_0903_DCOE:
drd runcmd update-ux -p
-s hpsvr:/var/opt/HPUX_1131_0903_DCOE HPUX11i-DC-OE
To update the inactive image to 0903 HPUX11i-DC-OE from the depot /var/opt/1131_0903_DCOE,
and explicitly deselect T1458AA:
drd runcmd update-ux
-s hpsvr:/var/opt/HPUX_1131_0903_DCOE HPUX11i-DC-OE !T1458AA
To see the software that is installed on the inactive system image (without any need to mount the image
first):
drd runcmd swlist
To install PHCO_0001 from the depot /var/opt/patches, located on the system patchsvr:
drd runcmd swinstall -s patchsvr:/var/opt/patches PHCO_0001
To run a preview installation of PHCO_0001 from the depot /var/opt/patches, located on the system
patchsvr:
drd runcmd swinstall -p -s patchsvr:/var/opt/patches PHCO_0001
To verify all software on the inactive system image:
drd runcmd swverify
To remove PHKL_9999 from the inactive system image:
drd runcmd swremove PHKL_9999
4
Hewlett-Packard Company
−4−
HP-UX 11i Version 3: September 2010
drd-runcmd(1M)
drd-runcmd(1M)
To view the swagent log on the inactive system image:
drd runcmd view /var/adm/sw/swagent.log
To display all drd runcmd extended options:
drd runcmd -x -?
AUTHOR
drd was developed by Hewlett-Packard Development Company, L.P.
FILES
/var/opt/drd/drd.log
Log file.
SEE ALSO
view(1), drd(1M), drd-activate(1M), drd-clone(1M), drd-deactivate(1M), drd-mount(1M), drd-rehost(1M),
drd-status(1M), drd-sync(1M), drd-umount(1M), drd-unrehost(1M), kcmodule(1M), kconfig(1M),
kctune(1M), mk_kernel(1M), swinstall(1M), swlist(1M), swmodify(1M), swm-job(1M), swremove(1M),
swverify(1M), update-ux(1M).
Dynamic Root Disk Administrator’s Guide , available at http://www.hp.com/go/drd-docs.
HP-UX 11i Version 3: September 2010
−5−
Hewlett-Packard Company
5
A
dA
(Notes)
A
(Notes)
dA
6
Hewlett-Packard Company
−1−
HP-UX 11i Version 3: September 2010
Download