NAME

lkmi_inodes


SYNOPSIS

#include <lkmi.h >

int lkmi_inodes (register lkmi_inodes_t *inodes_info)


PARAMETERS

inodes_info
Pointer to structure which is described below.


DESCRIPTION

Function retrieves kernel informations about used and allocated i-nodes using /proc/sys/fs/inode-nr and /proc/sys/fs/inode-max files. In older kernels are files placed /proc/sys/kernel/inode-nr and /proc/sys/kernel/inode-max. These files are tried if first file is not available. Fills structure lkmi_inodes_t which contains these fields.

max
Maximum number of i-node entries that can be allocated.

allocated
Current number of allocated i-node entries.

current
Current number of allocated i-node entries


RETURN VALUE

On success, zero is returned. If one of files is missing then partial value(s) is not retrieved. On error, -1 is returned, and errno is set appropriately.

If some value is missing the field is set to LKMI_NOTAVAILABLE.

EINVAL
Passed pointer to inodes_info is NULL.

other
See fopen(3) function, which causes 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