1System::Info::Base(3) User Contributed Perl DocumentationSystem::Info::Base(3)
2
3
4

NAME

6       System::Info::Base - Baseclass for system information.
7

ATTRIBUTES

9   cpu
10   cpu_type
11   ncpu
12   os
13   host

DESCRIPTION

15   System::Info::Base->new()
16       Return a new instance for $^O
17
18   $si->prepare_sysinfo
19       This method should be overridden by platform specific subclasses.
20
21       The generic information is taken from POSIX::uname().
22
23       $self->_hostname  => (POSIX::uname)[1]
24       $self->_os        => join " - " => (POSIX::uname)[0,2]
25       $self->_osname    => (POSIX::uname)[0]
26       $self->_osvers    => (POSIX::uname)[2]
27       $self->_cpu_type  => (POSIX::uname)[4]
28       $self->_cpu       => (POSIX::uname)[4]
29       $self->_cpu_count => ""
30
31   $si->get_os
32       Returns $self->_os
33
34   $si->get_hostname
35       Returns $self->_hostname
36
37   $si->get_cpu_type
38       Returns $self->_cpu_type
39
40   $si->get_cpu
41       Returns $self->_cpu
42
43   $si->get_cpu_count
44       Returns $self->_cpu_count
45
46   $si->get_core_count
47       Returns $self->get_cpu_count as a number
48
49       If "get_cpu_count" returns "2 [8 cores]", "get_core_count" returns 8
50
51   $si->get_dist_name
52       Returns the name of the distribution.
53
54   si_uname (@args)
55       This class gathers most of the uname(1) info, make a comparable
56       version. Takes almost the same arguments:
57
58           a for all (can be omitted)
59           n for nodename
60           s for os name and version
61           m for cpu name
62           c for cpu count
63           p for cpu_type
64
65   $si->old_dump
66       Just a backward compatible way to dump the object (for test suite).
67
69       (c) 2016-2023, Abe Timmerman & H.Merijn Brand, All rights reserved.
70
71       With contributions from Jarkko Hietaniemi, Campo Weijerman, Alan
72       Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn,
73       David Cantrell.
74
75       This library is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77
78       See:
79
80       •   <http://www.perl.com/perl/misc/Artistic.html>
81
82       •   <http://www.gnu.org/copyleft/gpl.html>
83
84       This program is distributed in the hope that it will be useful, but
85       WITHOUT ANY WARRANTY; without even the implied warranty of
86       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
87
88
89
90perl v5.36.0                      2023-01-20             System::Info::Base(3)
Impressum