NAME

lkmi_hdd


SYNOPSIS

#include <lkmi.h >

int lkmi_hdd (lkmi_hdd_t *hdd_info, int index, int num, short flag);


PARAMETERS

hdd_info
Pointer to structure which is described bellow. If this pointer is NULL then number of disk drives is returned.

index
The index of HDD or partition (depends on flag parameter). If this index is -1 and hdd_info is not NULL then only number of disks is returned.

num
flag
Flag determines if only whole disks are evaluated LKMI_HDD_DISKS or all partitions (without disks) are evaluated LKMI_HDD_PARTS.


DESCRIPTION

Function retrieves information about Hard Disk Drive (HDD) and their counters in structure lkmi_hdd_t which contains these fields.

lkmi_hdd_t

number
This field contains actual number of drives. This field is set on each successful call.

devname
This field contain name of device without /dev/. I.e. first IDE disk has name hda.

NOTE: Meaning of the next fields have to be checked against kernel source code.

rio
Number of reading operations.

rmerge
Under investigation.

rsect
Under investigation.

ruse
Under investigation.

wio
Number of write operations.

wmerge
Under investigation.

wsect
Under investigation.

wuse
Under investigation.

running
Under investigation.

use
Under investigation.

aveq
Under investigation.


RETURN VALUE

If parameter nic_info is NULL then number of NICs is returned.

If this parameter is valid pointer and function ends successfully then returns 0. If call fail, functions returns -1 and sets errno value to:

EINVAL
The flag parameter has incorrect value;

ENOENT
HDD index is out of range. Not all array elements has useful data.

other
The lkmi_hdd function may also fail and set errno for any of the errors specified for the routine fopen(3).


BUGS REPORTING

Please use the SourceForge Reporting page which is located here:

Bug Report


COPYRIGHT

This function is written as part of lkmi library for Linux system and may be freely distributed under GPL terms.

Copyright (c) 1995, 2002 David Doubrava (linux_monitor(at)volny(dot)cz).


SEE ALSO

Origin of values description is in Linux kernel source.

lkmi, lkmi_cpu, lkmi_files, lkmi_filesys, lkmi_hdd, lkmi_hw_intr, lkmi_inodes, lkmi_memory, lkmi_memoryswap, lkmi_net, lkmi_proc, lkmi_readprocesses, lkmi_swap, lkmi_swapex, lkmi_system