1Sys::Statistics::Linux:U:sFeirleCSotnattrsi(b3u)ted PerlSyDso:c:uSmteanttiasttiiocns::Linux::FileStats(3)
2
3
4

NAME

6       Sys::Statistics::Linux::FileStats - Collect linux file statistics.
7

SYNOPSIS

9           use Sys::Statistics::Linux::FileStats;
10
11           my $lxs  = Sys::Statistics::Linux::FileStats->new;
12           my $stat = $lxs->get;
13

DESCRIPTION

15       Sys::Statistics::Linux::FileStats gathers file statistics from the
16       virtual /proc filesystem (procfs).
17
18       For more information read the documentation of the front-end module
19       Sys::Statistics::Linux.
20

FILE STATISTICS

22       Generated by /proc/sys/fs/file-nr, /proc/sys/fs/inode-nr and
23       /proc/sys/fs/dentry-state.
24
25           fhalloc    -  Number of allocated file handles.
26           fhfree     -  Number of free file handles.
27           fhmax      -  Number of maximum file handles.
28           inalloc    -  Number of allocated inodes.
29           infree     -  Number of free inodes.
30           inmax      -  Number of maximum inodes.
31           dentries   -  Dirty directory cache entries.
32           unused     -  Free diretory cache size.
33           agelimit   -  Time in seconds the dirty cache entries can be reclaimed.
34           wantpages  -  Pages that are requested by the system when memory is short.
35

METHODS

37   new()
38       Call "new()" to create a new object.
39
40           my $lxs = Sys::Statistics::Linux::FileStats->new;
41
42       It's possible to set the path to the proc filesystem.
43
44            Sys::Statistics::Linux::FileStats->new(
45               files => {
46                   # This is the default
47                   path     => '/proc',
48                   file_nr  => 'sys/fs/file-nr',
49                   inode_nr => 'sys/fs/inode-nr',
50                   dentries => 'sys/fs/dentry-state',
51               }
52           );
53
54   get()
55       Call "get()" to get the statistics. "get()" returns the statistics as a
56       hash reference.
57
58           my $stat = $lxs->get;
59

EXPORTS

61       No exports.
62

SEE ALSO

64       proc(5)
65

REPORTING BUGS

67       Please report all bugs to <jschulz.cpan(at)bloonix.de>.
68

AUTHOR

70       Jonny Schulz <jschulz.cpan(at)bloonix.de>.
71
73       Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
74
75       This program is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77
78
79
80perl v5.34.0                      2021-07-2S2ys::Statistics::Linux::FileStats(3)
Impressum