Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Troubleshooting Guide   

Logging Transactions

The vxtranslog command allows you to log VxVM transactions to a file. The following table demonstrates the usage of vxtranslog:

Command Description

vxtranslog -l

List current settings for transaction logging.

vxtranslog -m on

Turn on transaction logging.

vxtranslog -s 512k

Set the maximum transaction log file size to 512KB.

vxtranslog -n 10

Set the maximum number of historic transaction log files to 10.

vxtranslog -n no_limit

Remove any limit on the number of historic transaction log files.

vxtranslog -q on

Turn on query logging.

vxtranslog -q off

Turn off query logging.

vxtranslog -m off

Turn off transaction logging.

Transactions are logged to the file, translog, 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 vxtranslog utility, you must also copy the settings file, .translog, to the new directory.


Note   Note    The .translog file is a binary and should not be edited.

The size of the transaction 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 transaction log file, translog, is renamed as the next available historic log file, translog.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 transaction log file:


Fri Oct 17 13:23:30 2003
Clid = 23460, PID = 21240, Part = 0, Status = 0, Abort Reason = 0
        DA_GET   Disk_0
        DISK_GET_ATTRS  Disk_0
        DISK_DISK_OP  Disk_0 8
        DEVNO_GET   Disk_0
        DANAME_GET   0x160045 0x160072
        GET_ARRAYNAME  Disk DISKS
        CTLR_PTOLNAME  11-08-01
        GET_ARRAYNAME  Disk DISKS
        CTLR_PTOLNAME  21-08-01
        DROPPED  <no request data>

The first line of each log entry is the time stamp of the transaction. The Clid field corresponds to the client ID for the connection that the command opened to vxconfigd. The PID field shows the process ID of the utility that is requesting the operation. The Status and Abort Reason fields contain error codes if the transaction does not complete normally. The remainder of the record shows the data that was used in processing the transaction.


Note   Note    The client ID is the same as that recorded for the corresponding command line in the command log. See Logging Commands and Associating Command and Transaction Logs for more information.

If there is an error reading from the settings file, transaction logging switches to its built-in default settings. This may mean, for example, that logging remains enabled after being disabled using vxtranslog -m off command. If this happens, use the vxtranslog utility to recreate the settings file, or restore the file from a backup.

 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Troubleshooting Guide  
VERITAS Software Corporation
www.veritas.com