![]() |
< Previous | Next > |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Troubleshooting Guide |
Logging Commands
The vxcmdlog command allows you to log the invocation of other VxVM commands to a file. The following table demonstrates the usage of vxcmdlog:
Remove any limit on the number of historic command log files.
Command lines are logged to the file, cmdlog, in the directory /etc/vx/log. This path name is a symbolic link to a directory whose location depends on the operating system. If required, you can redefine the directory which is linked. If you want to preserve the settings of the vxcmdlog utility, you must also copy the settings file, .cmdlog, to the new directory. ![]() 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. ![]() 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. See the vxcmdlog(1M) manual page for more information about the vxcmdlog utility. |
^ Return to Top | < Previous | Next > |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Troubleshooting Guide | |
VERITAS Software Corporation
www.veritas.com |