NAME

lkmi_files


SYNOPSIS

#include <lkmi.h >

int lkmi_files (lkmi_openfiles_t *openfiles_info);


PARAMETERS

openfiles_info
Pointer to structure which is described below.


DESCRIPTION

Function retrieves kernel informations about opened files using /proc/sys/fs/file-nr and /proc/sys/fs/file-max files. These files are tried if first file is not available.> Fills structure lkmi_openfiles_t which contains these fields.

max
Maximum number of opened files.

current
Number of actually opened files.


RETURN VALUE

On success, 0 is returned. If one of files is missing then function fails. On error, -1 is returned, and errno is set appropriately.

EINVAL
Pointer openfiles_info is NULL.

other
See fopen(3) function, which can cause other errors.


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