Veritas Volume Manager 5.0 Troubleshooting Guide Guide (September 2006)
42 Logging commands and transactions
Logging commands
If you want to preserve the settings of the vxcmdlog utility, you must also copy the
settings file, .cmdlog, to the new directory.
Note: The .cmdlog file is a binary and should not be edited.
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 a maximum 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, and a new current log file is created.
A limited number of historic log files is preserved to avoid filling up the file system. 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.
Each log file contains a header that records the host name, host ID, and the date and time
that the log was created.
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_4
# 26924, 3001, Thu Feb 13 19:30:57 2003
/usr/sbin/vxdisk list Disk_1
Each entry usually contains a client ID that identifies the command connection to the
vxconfigd daemon, the process ID of the command that is running, a time stamp, and the
command line including any 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. See “Logging transactions” on page 44 and “Associating command and
transaction logs” on page 46 for more information.
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.
If there is an error reading from the settings file, command logging switches to its built-in
default settings. This may mean, for example, that logging remains enabled after being
disabled using
vxcmdlog -m off command. If this happens, use the vxcmdlog utility to
recreate the settings file, or restore the file from a backup.