Retrieves individual disk usage statistics.
Perfstat Library (libperfstat.a)
Contains a name identifying the first disk for which statistics are desired. "" is used to indicate the first available disk. For example:
|userbuff||Points to the memory area that is to be filled with one or more perfstat_disk_t structures.|
|sizeof_struct||Specifies the size of the perfstat_disk_t structure: sizeof(perfstat_cpu_t)|
|desired_number||Specifies the number of perfstat_disk_t structures to copy to userbuff.|
The perfstat_disk subroutine retrieves one or more individual disk usage statistics. The same function can also be used to retrieve the number of available sets of disk statistics.
To get one or more sets of disk usage metrics, set the name parameter to the name of the first disk for which statistics are desired, and set the desired_number parameter. To start from the first disk, specify "" as the name. The userbuff paremeter must always point to a memory area big enough to contain the desired number of perfstat_disk_t structures that will be copied by this function. Upon return, the name parameter will be set to either the name of the next disk, or to "" after all structures have been copied.
To retrieve the number of available sets of disk usage metrics, set the name and userbuff parameters to NULL, and desired_number to 0 (zero). The returned value will be the number of available sets.
Unless the function is used to retrieve the number of available structures, the number of structures filled is returned upon successful completion. Otherwise, a value of -1 is returned and the errno variable is set.
The perfstat_disk subroutine is unsuccessful if one of the
following is true:
|EINVAL||One of the parameters is not valid.|
|ENOMEM||The string default length is too short.|
|ENOMSG||Cannot access the dictionary.|
The perfstat_disk subroutine is part of the Base Operating System (BOS) runtime.
/usr/include/libperfstat.h Defines standard macros, data types, and subroutines.
The perfstat_cpu subroutine, perfstat_cpu_total subroutine, perfstat_memory_total subroutine, perfstat_disk_total subroutine, perfstat_netinterface subroutine, and perfstat_netinterface_total subroutine.