1Sys::Statistics::Linux:U:sSeyrsICnofnot(r3ipbmu)ted PerlSyDso:c:uSmteanttiasttiiocns::Linux::SysInfo(3pm)
2
3
4
6 Sys::Statistics::Linux::SysInfo - Collect linux system information.
7
9 use Sys::Statistics::Linux::SysInfo;
10
11 my $lxs = Sys::Statistics::Linux::SysInfo->new;
12 my $info = $lxs->get;
13
15 Sys::Statistics::Linux::SysInfo gathers system information 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
22 Generated by
23 /proc/sys/kernel/{hostname,domainname,ostype,osrelease,version} and
24 /proc/cpuinfo, /proc/meminfo, /proc/uptime, /proc/net/dev.
25
26 hostname - The host name.
27 domain - The host domain name.
28 kernel - The kernel name.
29 release - The kernel release.
30 version - The kernel version.
31 memtotal - The total size of memory.
32 swaptotal - The total size of swap space.
33 uptime - The uptime of the system.
34 idletime - The idle time of the system.
35 pcpucount - The total number of physical CPUs.
36 tcpucount - The total number of CPUs (cores, hyper threading).
37 interfaces - The interfaces of the system.
38 arch - The machine hardware name (uname -m).
39
40 # countcpus is the same like tcpucount
41 countcpus - The total (maybe logical) number of CPUs.
42
43 "pcpucount" and "tcpucount" are really easy to understand. Both values
44 are collected from "/proc/cpuinfo". "pcpucount" is the number of
45 physical CPUs, counted by "physical id". "tcpucount" is just the total
46 number counted by "processor".
47
48 If you want to get "uptime" and "idletime" as raw value you can set
49
50 $Sys::Statistics::Linux::SysInfo::RAWTIME = 1;
51 # or with
52 Sys::Statistics::Linux::SysInfo->new(rawtime => 1)
53
55 new()
56 Call new() to create a new object.
57
58 my $lxs = Sys::Statistics::Linux::SysInfo->new;
59
60 get()
61 Call get() to get the statistics. get() returns the statistics as a
62 hash reference.
63
64 my $info = $lxs->get;
65
67 No exports.
68
70 proc(5)
71
73 Please report all bugs to <jschulz.cpan(at)bloonix.de>.
74
76 Jonny Schulz <jschulz.cpan(at)bloonix.de>.
77
79 Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
80
81 This program is free software; you can redistribute it and/or modify it
82 under the same terms as Perl itself.
83
84
85
86perl v5.38.0 2023-07-2S1ys::Statistics::Linux::SysInfo(3pm)