]> git.vpit.fr Git - perl/modules/Linux-SysInfo.git/blob - README
Importing Linux-SysInfo-0.03.tar.gz
[perl/modules/Linux-SysInfo.git] / README
1 NAME
2     Linux::SysInfo - Perl interface to the sysinfo(2) Linux system call.
3
4 VERSION
5     Version 0.03
6
7 SYNOPSIS
8         use Linux::SysInfo qw/sysinfo/;
9
10         my $si = sysinfo;
11         print "$_: $si->{$_}\n" for keys %$si;
12
13 DESCRIPTION
14     This module is a wrapper around the sysinfo(2) Linux system call. It
15     gives information about the current uptime, load average, memory usage
16     and processes running. Other systems have also this system call (e.g.
17     Solaris), but in most cases the returned information is different.
18
19 EXPORT
20     The only function of this module, "sysinfo", and the constant
21     "LS_HAS_EXTENDED" are only exported on request.
22
23 FUNCTIONS
24   "sysinfo"
25     This function takes no argument. It returns undef on failure or a hash
26     reference whose keys are the members name of the struct sysinfo on
27     success :
28
29     "uptime"
30         Seconds elapsed since the system booted.
31
32     "load1", "load5", "load15"
33         1, 5 and 15 minutes load average.
34
35     "totalram"
36         Total usable main memory size.
37
38     "freeram"
39         Available memory size.
40
41     "sharedram"
42         Amount of shared memory.
43
44     "bufferram"
45         Memory used by buffers.
46
47     "totalswap"
48         Total swap space size.
49
50     "freeswap"
51         Swap space stil available.
52
53     "procs"
54         Number of current processes.
55
56     Prior to Linux 2.3.23 on i386 and 2.3.48 on all other architectures, the
57     memory sizes were given in bytes. Since then, the following members are
58     also available and all the memory sizes are given as multiples of
59     mem_unit bytes :
60
61     "totalhigh"
62         Total high memory size.
63
64     "freehigh"
65         Available high memory size.
66
67     "mem_unit"
68         Memory unit size in bytes.
69
70 CONSTANTS
71   LS_HAS_EXTENDED
72     This constant is set to 1 if your kernel supports the three extended
73     fields "totalhigh", "freehigh" and "mem_unit" ; and to 0 otherwise.
74
75 BINARY COMPATIBILITY
76     If you upgrade your kernel to a greater version than 2.3.23 on i386 or
77     2.3.48 on any other platform, you will need to rebuild the module to
78     access the extended fields.
79
80     Moreover, since the perl hash function has changed after the 5.6
81     version, you will also need to recompile the module if you upgrade your
82     perl from a version earlier than 5.6.
83
84 SEE ALSO
85     The sysinfo(2) man page.
86
87     Sys::Info : Gather information about your system.
88
89     Sys::CpuLoad : Try several different methods to retrieve the load
90     average.
91
92     BSD::getloadavg : Wrapper to the getloadavg(3) BSD system call.
93
94 AUTHOR
95     Vincent Pit, "<perl at profvince.com>"
96
97 BUGS
98     Please report any bugs or feature requests to "bug-linux-sysinfo at
99     rt.cpan.org", or through the web interface at
100     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Linux-SysInfo>. I will
101     be notified, and then you'll automatically be notified of progress on
102     your bug as I make changes.
103
104 SUPPORT
105     You can find documentation for this module with the perldoc command.
106
107         perldoc Linux::SysInfo
108
109 COPYRIGHT & LICENSE
110     Copyright 2007 Vincent Pit, all rights reserved.
111
112     This program is free software; you can redistribute it and/or modify it
113     under the same terms as Perl itself.
114