vxtrace(ADM)


vxtrace - trace operations on volumes

Synopsis

vxtrace [ -eEla ] [ -d outputfile ] [ -f inputfile ] [ -t timeout ] [ -c eventcount ] [ -w waitinterval ]
[ -b buffersize ] [ -g diskgroup ] [ -o objtype [,objtype]... ] [ name | device ] ...

Description

The vxtrace utility prints kernel error or I/O trace event records on the standard output or writes them to a file in binary format. Binary trace records written to a file can be read back and formatted by vxtrace as well.

If no operands are given, then either all error trace data or all I/O trace data on all virtual disk devices are reported. With error trace data, it is possible to select all accumulated error trace data, to wait for new error trace data, or both (the default). Selection can be limited to a specific disk group, to specific VxVM kernel I/O object types, or to particular named objects or devices.

Options

-e
Select new error trace data. The default is to select I/O trace data.

-E
Select pre-existing error trace data. This can be combined with -e to get both preexisting trace data and new trace data.

-l
Long format. Print all available fields for all tracing records, rather than a subset of the available fields. The default is to use the short format.

-d outputfile
Write (dump) binary trace data to the specified output file.

-a
Append to the outputfile rather than truncating it. By default, the output file is truncated.

-f inputfile
Read binary trace data from the specified input file, rather than from the kernel.

-t timeout
Accumulate trace data for at most timeout seconds and then exit.

-c eventcount
Accumulate at most eventcount events and then exit. The timeout and eventcount options can be used together.

-w waitinterval
If vxtrace waits for waitinterval seconds without receiving any new events, print "waiting ..." to allow scripts to wake up and process previously accumulated events. This is mostly of use for processing errors. The "waiting ..." message does not count as an event for the purposes of the -c option.

-b buffersize
Set the kernel I/O trace buffer size or set the read buffer size when used with the -f option. The Volume Manager kernel allocates a private kernel space to buffer the I/O trace records for each vxtrace command. The default buffer size is 8K bytes. Some trace records may be discarded if the trace buffer is too small. This option can be used to set a larger or a smaller kernel trace buffer size. The buffer size is specified as a standard Volume Manager length (see vxintro(ADM)). Depending on the Volume Manager kernel configuration, usually only a maximum of 64K bytes buffer size will be granted.

-g diskgroup
Select objects from the specified disk group. The disk group can be specified either by disk group ID or by disk group name. With no name or device operands, all appropriate objects in the disk group are selected. With name operands, diskgroup names the disk group that is expected to contain the named configuration record.

-o objtype[,objtype]...
Select object based on the objtype option arguments. Multiple types of objects can be specified with one or several -o options. The possible object selection types are:

v | vol | volume
Select mirrored or RAID-5 volume kernel objects.

p | pl | plex
Select striped or concatenated plex kernel objects.

m | mv | mirror
Select mirrored volume kernel objects.

s | sd | subdisk
Select subdisk kernel objects.

disk | physical
Select VxVM physical disks.

dev | logical
Select virtual disk devices.

logvol
Select DRL or RAID-5 log volumes.

logplex
Select RAID-5 log plexes.

logsd
Select DRL or RAID-5 log subdisks.

log
Select all log objects.

all | ALL
Select all possible virtual disk devices, kernel objects and physical disks.

If name or device operands are provided, then kernel objects of the requested types are selected if they are associated with the configuration records or virtual disk devices indicated by those operands.

Operands

Operands specify configuration record names, or physical or virtual disk device nodes (by device path). If no object types were selected with the -o option, then only trace records corresponding to the indicated configuration records or devices are selected; otherwise, objects of the requested types are selected if they are associated in any way with the named configuration record or device.

If a name argument does not match a regular configuration record but does match a disk access record, then the indicated physical disk is selected. Physical disks can also be selected by the device path of the public region partition, or by the disk media record name.

By default name arguments are searched for in all disk groups or in the disk group specified using the -g option. Without the -g option, a record that is found in more than one disk group will cause an error unless the record is in the rootdg disk group (in which case, the record in the rootdg disk group is selected). The disk group for any individual name operand can be overridden using the form:

	diskgroup/recordname 

NOTE: When reading trace data from a file with the -f option, association information is not available.

Examples:

To trace all physical disk I/Os, use the command:

	vxtrace -o disk 
To trace virtual disk device I/Os to the device associated with volume testvol, use either of the commands:

	vxtrace -o dev testvol 

	vxtrace /dev/vx/dsk/testvol 
To trace all log subdisks associated with volume testvol use the commands:

	vxtrace -o logsd testvol 
To trace all log objects, use the command:

	vxtrace -o log 
To accumulate 10 seconds worth of trace data for disk04 and then format that data, use:

	vxtrace -t 10 -d /tmp/tracedata disk04 

	vxtrace -l -f /tmp/tracedata 
To read error trace data into a script for processing, using 10 second pauses to generate mail messages, use the command:

	vxtrace -leE -w 10 | while read ... 

Files

/dev/vx/trace

References

vxintro(ADM), vxstat(ADM), vxtrace(HW)



Copyright © 2005 The SCO Group, Inc. All rights reserved.