X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLinux-SysInfo.git;a=blobdiff_plain;f=README;h=7793777536b3bf750699d8d7fbbd9a71b0acef52;hp=8bca0c2b27ce9cc05f8a2f0b6fef90edaffafebd;hb=HEAD;hpb=6459a6c2b2ebbcd7a8be8fce533739ad96b1347b diff --git a/README b/README index 8bca0c2..7793777 100644 --- a/README +++ b/README @@ -2,10 +2,10 @@ NAME Linux::SysInfo - Perl interface to the sysinfo(2) Linux system call. VERSION - Version 0.03 + Version 0.15 SYNOPSIS - use Linux::SysInfo qw/sysinfo/; + use Linux::SysInfo qw; my $si = sysinfo; print "$_: $si->{$_}\n" for keys %$si; @@ -16,61 +16,74 @@ DESCRIPTION and processes running. Other systems have also this system call (e.g. Solaris), but in most cases the returned information is different. -EXPORT - The only function of this module, "sysinfo", and the constant - "LS_HAS_EXTENDED" are only exported on request. +CONSTANTS + "LS_HAS_EXTENDED" + This constant is set to 1 if your kernel supports the three extended + fields "totalhigh", "freehigh" and "mem_unit" ; and to 0 otherwise. FUNCTIONS "sysinfo" - This function takes no argument. It returns undef on failure or a hash - reference whose keys are the members name of the struct sysinfo on + This function takes no argument. It returns "undef" on failure or a hash + reference whose keys are the members name of the "struct sysinfo" on success : - "uptime" + * "uptime" + Seconds elapsed since the system booted. - "load1", "load5", "load15" + * "load1", "load5", "load15" + 1, 5 and 15 minutes load average. - "totalram" + * "totalram" + Total usable main memory size. - "freeram" + * "freeram" + Available memory size. - "sharedram" + * "sharedram" + Amount of shared memory. - "bufferram" + * "bufferram" + Memory used by buffers. - "totalswap" + * "totalswap" + Total swap space size. - "freeswap" - Swap space stil available. + * "freeswap" + + Swap space still available. + + * "procs" - "procs" Number of current processes. Prior to Linux 2.3.23 on i386 and 2.3.48 on all other architectures, the memory sizes were given in bytes. Since then, the following members are also available and all the memory sizes are given as multiples of - mem_unit bytes : + "mem_unit" bytes : + + * "totalhigh" - "totalhigh" Total high memory size. - "freehigh" + * "freehigh" + Available high memory size. - "mem_unit" + * "mem_unit" + Memory unit size in bytes. -CONSTANTS - LS_HAS_EXTENDED - This constant is set to 1 if your kernel supports the three extended - fields "totalhigh", "freehigh" and "mem_unit" ; and to 0 otherwise. +EXPORT + The only function of this module, "sysinfo", and the constant + "LS_HAS_EXTENDED" are only exported on request. Functions are also + exported by the ":funcs" tag, and constants by ":consts". BINARY COMPATIBILITY If you upgrade your kernel to a greater version than 2.3.23 on i386 or @@ -81,6 +94,12 @@ BINARY COMPATIBILITY version, you will also need to recompile the module if you upgrade your perl from a version earlier than 5.6. +DEPENDENCIES + perl 5.6. + + A C compiler. This module may happen to build with a C++ compiler as + well, but don't rely on it, as no guarantee is made in this regard. + SEE ALSO The sysinfo(2) man page. @@ -92,7 +111,9 @@ SEE ALSO BSD::getloadavg : Wrapper to the getloadavg(3) BSD system call. AUTHOR - Vincent Pit, "" + Vincent Pit, "", . + + You can contact me by mail or on "irc.perl.org" (vincent). BUGS Please report any bugs or feature requests to "bug-linux-sysinfo at @@ -107,7 +128,8 @@ SUPPORT perldoc Linux::SysInfo COPYRIGHT & LICENSE - Copyright 2007 Vincent Pit, all rights reserved. + Copyright 2007,2008,2009,2010,2013,2017 Vincent Pit, all rights + reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.