test veritas logo


vxcmdlog(1M)

NAME

vxcmdlog - administer command logging

SYNOPSIS

vxcmdlog [-H] [-l] [-m {on|off}] [-n number] [-s size]

DESCRIPTION

The vxcmdlog command is used to administer command logging in Veritas Volume Manager (VxVM). This feature can be used to record all VxVM commands that are issued, and can be used in conjunction with the transaction logging feature (see vxtranslog(1M)).

When the current log file reaches a maximum size, it is renamed as a historic log file, and a new current log file is created. A limited number of historic log files is preserved to avoid filling up the file system.

Each log file contains a header that records the host name, host ID, and the date and time that the log was created. See the EXAMPLES section below for a description of the entries that are recorded in a log file.

OPTIONS

-H Displays detailed help about the usage of the command.
-l Lists current settings for command logging. This shows whether command logging is enabled, the maximum number of historic log files, and the maximum log file size.
-m {on|off} Turns command logging on or off. By default, command logging is turned on.
-n number Sets the maximum number of historic log files to maintain. The default number is 5. If number is set to no_limit, there is no limit on the number of historic log files that are created.
-s size Sets the maximum size to which a command log can grow. (Note that this setting has no effect on existing historic log files.)
The suffix modifiers k, m, and g may be used express sizes in kilobytes, megabytes and gigabytes respectively. If no suffix is specified, the default units are kilobytes.
If size is set to no_limit, there is no limit on the size of the log file.
The size of the command log is checked after an entry has been written so the actual size may be slightly larger than that specified. When the log reaches the specified size, the current command log file, cmdlog, is renamed as the next available historic log file, cmdlog.number, where number is an integer from 1 up to the maximum number of historic log files that is currently defined.
If the maximum number of historic log files has been reached, the oldest historic log file is removed, and the current log file is renamed as that file.
The default maximum size of the command log file is 1m (1MB).

EXAMPLES

Turn on command logging:

vxcmdlog -m on

Set the maximum command log file size to 512KB:


vxcmdlog -s 512k

Set the maximum number of historic command log files to 10:


vxcmdlog -n 10

The following are sample entries from a command log file:


# 0, 2329, Wed Feb 12 21:19:31 2003     /usr/sbin/vxdctl mode # 17051, 2635, Wed Feb 12 21:19:33 2003     /usr/sbin/vxdisk -q -o alldgs list # 0, 2722, Wed Feb 12 21:19:34 2003     /etc/vx/diag.d/vxprivutil dumpconfig /dev/vx/rdmp/Disk_4s2 # 26924, 3001, Thu Feb 13 19:30:57 2003     /usr/sbin/vxdisk list SENA0_1

Each entry usually contains a client ID that identifies the command connection to the vxconfigd daemon, the process ID of the command, a time stamp, and the command that was used together with its arguments. If the client ID is 0, as in the third entry shown here, this means that the command did not open a connection to vxconfigd.

Note: The client ID is the same as that recorded for the corresponding transactions in the transactions log.

FILES

/etc/vx/log Symbolic link to the log directory. This can be redefined if necessary.
/etc/vx/log/cmdlog Current command log.
/etc/vx/log/cmdlog.number
  Historic command logs.

NOTES

If vxcmdlog records the invocation of a vxmake command that reads object definitions from a description file, vxcmdlog additionally records the contents of the description file.

Most command scripts are not logged, but the command binaries that they call are logged. Exceptions are the vxdisksetup, vxinstall, and vxdiskunsetup scripts, which are logged.

SEE ALSO

vxtranslog(1M)

Veritas InfoScaleā„¢ Troubleshooting Guide


VxVM 7.3.1 vxcmdlog(1M)