DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

met_ds_alloc_stats(D3)


met_ds_alloc_stats -- allocate a disk statistics structure

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>
   

met_disk_stats_t * met_ds_alloc_stats(char *prefix, int unit, ulong size, uint flags)

Description

met_ds_alloc_stats is used to allocate a disk statistics structure; disk drivers must call met_ds_alloc_stats for each drive.

Arguments


prefix
Points to a string containing the prefix for the device.

unit
Unit number for a particular drive (used with prefix in constructing the device name).

size
The size of the device, either in cylinders, if this information is available, or in DEV_BSIZE blocks.

flags
Indicates whether size is cylinders or blocks and also whether the driver provides histogram collection data.

Return values

A pointer to a met_disk_stats_t statistics structure.

Usage

The driver usually calls this routine from its init routine, but in the case of dynamically loadable drivers, the call might be made from the driver load routine, if it does not call the init routine.

The flags parameter indicates whether size is cylinders or blocks and also indicates whether the driver provides histogram collection data. flags values are constructed by OR-ing flags from the following list:


MET_DS_CYL
size is given in terms of cylinders

MET_DS_BLK
size is given in terms of DEV_BSIZE blocks

MET_DS_NO_ACCESS_HIST
The driver does not provide information for updating the cylinder access and seek distance histograms. That is, it does not provide met_ds_hist_stats(D3) with either the cylinder or block number that the request accessed.

MET_DS_NO_RESP_HIST
The driver does not provide information for the response time histogram. That is, it does not provide met_ds_hist_stats with the request's start and end times. If the driver does not call met_ds_hist_stats, both MET_DS_NO_ACCESS_HIST and MET_DS_NO_RESP_HIST should be set.

Context and synchronization

User or blockable context.

Hardware applicability

All

Version applicability

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

met_ds_hist_stats(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005