NAME

lkmi_hw_intr


SYNOPSIS

#include <lkmi.h >

int lkmi_hw_intr (lkmi_hw_intr_t *pintr);


PARAMETERS

pintr
Contain pointer to the structure which is described below.


DESCRIPTION

lkmi_hw_intr obtains hw interrupts activity informations from /proc/stat.

All counters contains summary values from system boot.

num_int
This value depends on kernel version (I am not sure), Contains count of numbers in intr line of /proc/stat file.

intrs [LKMI_MAX_HW_INTRS]
Contains values from this line. There are numbers of catched interrupts from system boot. LKMI_MAX_HW_INTRS is defined in lkmi.h file as 256. This is value of max. available ix86 interrupt vectors. It may vary on other platforms.

Note: The LKMI_MAX_HW_INTRS may be defined as different number. It depend on HW (CPU) platform.


RETURN VALUE

If function ends successfully (partially successfully), then returns 0. If errno is set to 0 then all counters was retrieved successfully. If errno is set to ENOENT some partial counters are not filled, unfilled value is -1.

If call fails, functions returns -1 and sets errno value to:

ENOENT
If required file is not exist. f.e. proc file-system is not included in kernel or not mounted to /proc directory. Or the file doesn't contain required information.

EINVAL
NULL pointer is assigned as parameter sys_info.

The lkmi_hw_intr function may also failed 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