HPlogo HP-UX Reference > D

drd-runcmd(1M)

HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

drd-runcmd: 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

SYNOPSIS

drd runcmd [-?] [-q]... [-v]... [-x option=value]... [-x -?] [-X option_file] cmd [args]

DESCRIPTION

The drd runcmd command 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 in the Operands section below in the cmd column.

Options

drd runcmd recognizes the following options:

-?

Displays the usage message.

-p

Sets preview mode. See also -x preview, in the Extended -x Options section below.

-q

Decreases the verbosity level by one each time it is specified. For the interaction with -x verbosity, see the Extended -x Options section below.

-v

Increases the verbosity level by one each time it is specified. For the interaction with -x verbosity, see the Extended -x Options section below.

-x -?

Displays the list of possible -x (extended) options.

-x option=value

Sets the extended option to a value. See the Extended -x Options section below.

-X option_file

Gets the extended options from a file. See drd(1M) for an explanation of the format and an example of an option file.

Operands

drd runcmd recognizes the following operands:

cmd [args]

Specifies the DRD-Safe command to be run. The rest of the command line (args) is passed as arguments of cmd. The value of cmd must be one of the following:

cmdDescription
kctuneChange or display kernel tunables.
swinstallInstall software products and patches that are DRD safe.
swjobDisplay job information
swlistDisplay information about software products and patches.
swmodifyModify software products and patches.
swremoveRemove software products and patches.
swverifyVerify software products and patches.
viewRead files on the inactive image.

Extended -x Options

drd runcmd recognizes the following -x (extended) options. If a default value exists, it is shown in bold.

-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

Saves only ERROR messages and the starting/ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

Adds INFO messages (informational messages preceded by the * character).

4

Adds verbose INFO messages.

5

Adds very-verbose INFO messages.

-x preview=false

Usage: Basic

If true, run this command in preview mode only (that is, complete the analysis phase and exit; do not commit changes to disk). Setting this option to true has the same effect as specifying -p on the command line.

-x verbosity=3

Usage: Basic

Specifies the level of standard error verboseness:

0

Displays only ERROR messages and the starting/ending BANNER messages.

1

Adds WARNING messages.

2

Adds NOTE messages.

3

Adds INFO messages (informational messages preceded by the * character).

4

Adds verbose INFO messages.

5

Adds very-verbose INFO messages.

See also the -v and -q options in the Options section above. The -v option increases the verbosity by 1 (for example, from 3 to 4) and the -q option decreases the verbosity by 1. The -v and -q options can be given more than once. Multiples can be merged, as in -qq.

For example, if both -x verbosity=5 and -qqq are included on the command line, the effective verbosity is 2. The minimum combined verbosity level is 0.

For example, if both -x verbosity=1 and -vv are included on the command line, the effective verbosity is 3. The maximum combined verbosity level is 5.

Restrictions on Commands Executed by drd runcmd

DRD supports read access of registered directory depots and directory depots on the booted system. It does not support serial depots and it does not support depots on the inactive system image.

Depots cannot be listed or used as targets by drd runcmd. Thus, the commands swlist, swremove, swmodify, and swverify can be run by drd runcmd to view or modify the inactive system image, but not to view or modify depot contents.

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:

  • The -d option on swlist, swmodify, swverify, and swremove.

  • The @ option on swinstall, swlist, and 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 sw* command 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 must be specified simply as /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 sw* -X option, and to paths that appear in a file that is the argument of an sw* -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.

Note that you can have -x and -X options for both the drd runcmd (which would contain the runcmd's options) command and for the command you are running (which would contain that command's options).

The following (rare) options of sw* commands are not supported by drd runcmd:

OptionNotes
-cSpecification of a catalog is not supported.
-dDepot targets are not supported by drd runcmd. (See discussion above.)
-FExecution of fix scripts is not supported by drd runcmd.
-JScheduling of jobs is not supported by drd runcmd.
-QScheduling of jobs is not supported by drd runcmd.
-rInstallation to SD-style alternate roots is not supported by drd runcmd.
-tThe inactive system image is always the target in a drd runcmd operation.
-x admin_dirNonstandard IPD locations are not supported by drd runcmd.
-x agent_auto_exitNonstandard IPD locations are not supported by drd runcmd.
-x askUse of response files is not supported by drd runcmd.
-x auto_kernel_buildRegardless of the value of this option, a swremove executed by drd runcmd builds the kernel for the next boot.
-x autorebootRegardless of the value of this option, drd runcmd suppresses all reboots.
-x controller_sourceThis option is not supported by drd runcmd.
-x distribution_source_directoryThis option is not supported by drd runcmd.
-x distribution_target_directoryThis option is not supported by drd runcmd.
-x force_single_targetThis option is obsolete and is not supported by drd runcmd.
-x mount_all_filesystemsThis 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_targetThis operation is ignored for drd runcmd operations.
-x remove_empty_depotOperations targeted at depots are not supported by drd runcmd.
-x un_as_superuserThis option is not meaningful for drd runcmd, since it must be run as root.
-x select_localThis option is not supported by drd runcmd.
-x source_tapeTape depots are not supported by drd runcmd.
-x target_shared_rootThis options is obsolete and is not supported by drd runcmd.
-x targetsThis options is not supported by drd runcmd. The target is always the inactive system image.
-x use_alternate_sourceThis option is obsolete and is note supported by drd runcmd.

RETURN VALUE

drd runcmd returns the following values:

0

Success.

1

Error.

2

Warning.

EXAMPLES

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 \*

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 HP.

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-umount(1M), kctune(1M), swinstall(1M), swlist(1M), swmodify(1M), swremove(1M), swverify(1M)

Dynamic Root Disk Administrator's Guide, available on the HP Technical Documentation web site at http://docs/hp.com/en/DRD.