*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> vxtrace (7)              
Title
Content
Arch
Section
 

Contents


 vxtrace(7)                       VxVM 3.5                        vxtrace(7)
                                 1 Jun 2002



 NAME    [Toc]    [Back]
      vxtrace - VERITAS Volume Manager I/O Tracing Device

 SYNOPSIS    [Toc]    [Back]
      /dev/vx/trace

 DESCRIPTION    [Toc]    [Back]
      The vxtrace device implements the VERITAS Volume Manager (VxVM) I/O
      tracing and the error tracing.  An I/O tracing interface is available
      that users or processes can use to get a trace of I/Os for specified
      sets of kernel objects.  Each separate user of the I/O tracing
      interface can specify the set of desired trace data independent of all
      other users.  I/O events include regular read and write operations,
      special I/O operations (ioctls), as well as special recovery
      operations (for example, recovery reads).  A special tracing mechanism
      exists for getting error trace data.  The error tracing mechanism is
      independent of any I/O tracing and is always enabled for all pertinent
      kernel I/O objects.  It is possible for a process to get both a set of
      saved errors and to wait for new errors.

 IOCTLS    [Toc]    [Back]
      The format for calling each ioctl command is:

           #include <sys/types.h>
           #include <vxvm/voltrace.h>
           struct tag arg;
           int ioctl (int fd, int cmd, struct  tag arg);

      The first argument fd is a file descriptor which is returned from
      opening the /dev/vx/trace device.  Each tracing device opened is a
      cloned device which can be used as a private kernel trace channel.
      The value of cmd is the ioctl command code, and arg is usually a
      pointer to a structure containing the arguments that need to be passed
      to the kernel.

      The return value for all these ioctls is 0 if the command was
      successful, and -1 if it was rejected.  If the return value is -1,
      errno is set to indicate the cause of the error.

      The following ioctl commands are supported:

      VOLIOT_ERROR_TRACE_INIT    [Toc]    [Back]
           This command accepts no argument.  The VOLIOT_ERROR_TRACE ioctl
           initializes a kernel trace channel to return error trace data.
           The trace channel will be initialized to return any previously
           accumulated error trace data that has not yet been discarded. The
           accumulated trace data can be skipped by issuing VOLIOT_DISCARD
           on the channel.  This call can be issued on a trace channel that
           was previously initialized either for error tracing or for
           regular I/O tracing. In this case, the channel is effectively
           closed down and then reinitialized as described above.  To get



                                    - 1 -       Formatted:  January 24, 2005






 vxtrace(7)                       VxVM 3.5                        vxtrace(7)
                                 1 Jun 2002



           the error trace data, issue the read(2) system call. The error
           trace data consists of a set of variable length trace event
           records. The first byte of each record indicates the length, in
           bytes, of the entire record (including the length byte), the
           second byte indicates the type of the entry (which can be used to
           determine the format of the entry).  Each call to read() returns
           an integral number of trace event records, not to exceed the
           number of bytes requested in the read() call; the return value
           from read() will be adjusted to the number of bytes of trace data
           actually returned. If the O_NONBLOCK flag is set on the trace
           channel, and no trace data is available, EAGAIN will be returned;
           otherwise, the read will block interruptibly until at least one
           trace record is available. When some trace data is available, the
           available unread trace records will be returned, up to the limit
           specified in the call to read(). If more trace records are
           available, subsequent reads will return those records.

      VOLIOT_IO_TRACE_INIT    [Toc]    [Back]
           The VOLIOT_IO_TRACE_INIT ioctl initializes a kernel trace channel
           to return I/O trace data.  This command accepts bufsize as the
           argument.  Initially, no objects are selected for I/O tracing. To
           select objects to trace, issue the VOLIOT_IO_TRACE ioctl. The
           bufsize argument specifies the kernel buffer size to use for
           gathering events. A larger size reduces the chance that events
           are lost due to scheduling delays in the event reading process. A
           bufsize value of 0 requests a default size which is considered
           reasonable for the system. The value of bufsize will be silently
           truncated to a maximum value to avoid extreme use of system
           resources. A bufsize value of (size_t)-1 will yield the maximum
           buffer size.

      VOLIOT_IO_TRACE,VOLIOT_IO_UNTRACE
           The VOLIOT_IO_TRACE and VOLIOT_IO_UNTRACE ioctls enable and
           disable, respectively, I/O tracing for particular sets of objects
           on an I/O tracing channel.  They both accept a voliot_want_list
           structure tracelist as the argument.  The tracelist argument
           specifies object sets.  The voliot_want_list structure specifies
           an array of desired object sets. Each object set is identified by
           a union of structures (the voliot_want_set union), each
           representing different types of object sets.  See the declaration
           of these structures in voltrace.h for more detail.

 FILES    [Toc]    [Back]
      /dev/vx/trace

 SEE ALSO    [Toc]    [Back]
      vxintro(1M), vxtrace(1M), vxvol(1M) ioctl(2), read(2), vxconfig(7),
      vxiod(7)


                                    - 2 -       Formatted:  January 24, 2005
[ Back ]
      
      
 Similar pages
Name OS Title
vxconfig HP-UX VERITAS Volume Manager configuration device
vxinfo HP-UX VERITAS Volume Manager general information device
vxiod HP-UX VERITAS Volume Manager I/O daemon process control device
vxvmboot HP-UX prepare VERITAS Volume Manager volume as a root, boot, primary swap or dump volume
vxdiskadd HP-UX add one or more disks for use with VERITAS Volume Manager
vxdisksetup HP-UX configure a disk for use with VERITAS Volume Manager
vxintro HP-UX introduction to the VERITAS Volume Manager utilities
vxconfigd HP-UX VERITAS Volume Manager configuration daemon
vxsd HP-UX perform VERITAS Volume Manager operations on subdisks
vxmemstat HP-UX display memory statistics for VERITAS Volume Manager
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service