vxinfo - Volume Manager general information device




The vxinfo device is used to gather performance statistics from the kernel for a supplied object. Statistics can be retrieved for volume, plex, subdisk, and disk media objects.

Statistics can also be cleared through this interface.


The ioctl commands supported by the Volume Manager statistics device interface are discussed in this section. The format for calling each ioctl command is:

	#include <sys/types.h>
	#include <vvxvm/volstats.h>

	struct tag arg;

	int ioctl (int fd, int cmd, struct tag *arg);

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, with some exceptions, is 0 if the command was successful, and -1 if it was rejected. If the return value is -1, then errno is set to indicate the cause of the error.

The following ioctl commands are supported:

This ioctl returns the pid of the process with the vx/config device open, or 0 if the vx/config device is closed. The value of arg is undefined and should be NULL.

This command accepts a pointer to a volinfo structure as an argument. It fills in the volinfo structure with the corresponding values from the kernel. The members of a volinfo structure are:

	long      version;                 /* kernel version number*/ 
	long      max_volprivmem;          /* max size of volprivmem area */ 
	major_t   volbmajor;               /* volume blk dev major number */ 
	major_t   volcmajor;               /* volume char dev major number */ 
	major_t   plexmajor;               /* plex device major number */ 
	long      maxvol;                  /* max # of volumes supported */ 
	long      maxplex;                 /* max # of associated plexes */ 
	long      plexnum;                 /* max plexes per volume */ 
	long      sdnum;                   /* max subdisks per plex */ 
	long      max_ioctl;               /* max size of ioctl data */ 
	long      max_specio;              /* max size of ioctl I/O op */ 
	long      max_io;                  /* max size of I/O operation */ 
	long      vol_maxkiocount;         /* max # top level I/Os allowed */ 
	long      dflt_iodelay;            /* default I/O delay for utils */ 
	long      max_parallelio;          /* max # voldios allowed */ 
	long      voldrl_min_regionsz;     /* min DRL region size */ 
	long      voldrl_max_drtregs;     /* max # of DRL dirty region s*/ 
	long      vol_is_root;            /* if set, root is volume */ 
	long      mvrmaxround;            /* max round-robin region size */ 
	long      prom_version;           /* PROM version of the system */ 
	long      vol_maxstablebufsize;   /* max size of copy buffer */ 
	size_t    voliot_iobuf_limit;     /* max total I/O trace buf spc */ 
	size_t    voliot_iobuf_max;       /* max size of I/O trace buffer */ 
	size_t    voliot_iobuf_default;   /* default I/O trace buf size */ 
	size_t    voliot_errbuf_default;  /* default error trace buf size */ 
	long      voliot_max_open;        /* max # of trace channels */ 
	size_t    vol_checkpt_default;    /* default checkpoint size */ 
	long      volraid_rsrtransmax;    /* max # of transient RSRs */ 

This command accepts a pointer to a vol_io_stats_list structure as an argument so that a single ioctl can operate on any reasonable number of objects. The ioctl then fills in the performance statistics for the objects whose IDs appear in the structure.

The members of the vol_io_stats_list structure are:

	size_t    vsl_nobject;             /* # of objects */
	struct    vol_io_stats vsl_stats;  /* list of objects */

The members of the vol_io_stats structure are:

	volrid_t   vs_dg_iid;              /* disk group rid */
	volrid_t   vs_rid; vs_rid;         /* rid of object */
	int        vs_object_type;         /* object type */
	size_t     vs_stats_size;          /* size of stats buffer */
	structure  vol_stats vs_stats;     /* stats buffer */
The vs_dg_iid field identifies the disk group in which the vs_rid object exists. The vs_rid value can be obtained from either a volrec, plexrec, sdrec, or dmrec structure.

The vs_dg_iid for the required disk group can be found in the dgrec structure. The import ID is required so as to avoid ID number collisions between disk groups if using just the object's record ID.

Most statistics are formed as a concatenation of the vol_stats structure. The members of the vol_stats structure are:
	size_t    vs_op;                  /* count of I/O operations */
	size_t    vs_fail_op;             /* count of failed I/Os */
	size_t    vs_blocks;              /* total blocks of I/O */
	time_t    vs_time;                /* accumulated I/O times */

The vol_io_stats_list, vol_io_stats and vol_stats structures are defined in the </usr/include/vxvm/ volstats.h> header file.

This command accepts a pointer to a vol_io_stats_list structure as an argument and will clear the kernel statistics for the identified objects.


The following errors are returned by the VOL_GET_STATS and VOL_CLR_STATS ioctls:

A pointer passed to the kernel was invalid, causing a bad memory reference.

The supplied vs_dg_iid does not match any existing imported disk groups or the supplied vs_rid object could not be found.


Volume Manager info device


vxintro(ADM), ioctl(S), vxconfig(HW)

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