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

NAME

6       Sys::Statistics::Linux::DiskUsage - Collect linux disk usage.
7

SYNOPSIS

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

DESCRIPTION

15       Sys::Statistics::Linux::DiskUsage gathers the disk usage with the
16       command "df".
17
18       For more information read the documentation of the front-end module
19       Sys::Statistics::Linux.
20

DISK USAGE INFORMATIONS

22       Generated by /bin/df -kP.
23
24           total       -  The total size of the disk.
25           usage       -  The used disk space in kilobytes.
26           free        -  The free disk space in kilobytes.
27           usageper    -  The used disk space in percent.
28           mountpoint  -  The moint point of the disk.
29
30   GLOBAL VARS
31       If you want to change the path or arguments for "df" you can use the
32       following variables...
33
34           $Sys::Statistics::Linux::DiskUsage::DF_PATH = '/bin';
35           $Sys::Statistics::Linux::DiskUsage::DF_CMD  = 'df -akP';
36
37       Example:
38
39           use Sys::Statistics::Linux;
40           use Sys::Statistics::Linux::DiskUsage;
41           $Sys::Statistics::Linux::DiskUsage::DF_CMD = 'df -akP';
42
43           my $sys  = Sys::Statistics::Linux->new(diskusage => 1);
44           my $disk = $sys->get;
45

METHODS

47   new()
48       Call "new()" to create a new object.
49
50           my $lxs = Sys::Statistics::Linux::DiskUsage->new;
51
52       It's possible to set the path to df.
53
54            Sys::Statistics::Linux::DiskUsage->new(
55               cmd => {
56                   # This is the default
57                   path => '/bin',
58                   df   => 'df -kP 2>/dev/null',
59               }
60           );
61
62   get()
63       Call "get()" to get the statistics. "get()" returns the statistics as a
64       hash reference.
65
66           my $stat = $lxs->get;
67

EXPORTS

69       No exports.
70

SEE ALSO

72       df(1)
73

REPORTING BUGS

75       Please report all bugs to <jschulz.cpan(at)bloonix.de>.
76

AUTHOR

78       Jonny Schulz <jschulz.cpan(at)bloonix.de>.
79
81       Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
82
83       This program is free software; you can redistribute it and/or modify it
84       under the same terms as Perl itself.
85
86
87
88perl v5.32.0                      2020-07-2S8ys::Statistics::Linux::DiskUsage(3)
Impressum