-
-
01 Jan 2022 12:24:13 UTC
- Distribution: System-Info
- Module version: 0.050
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (2)
- Testers (500 / 0 / 0)
- Kwalitee
Bus factor: 1- 59.87% Coverage
- License: perl_5
- Perl: v5.8.3
- Activity
24 month- Tools
- Download (51.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- POSIX
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
System::Info::Base - Baseclass for system information.
ATTRIBUTES
cpu
cpu_type
ncpu
os
host
DESCRIPTION
System::Info::Base->new()
Return a new instance for $^O
$si->prepare_sysinfo
This method should be overridden by platform specific subclasses.
The generic information is taken from
POSIX::uname()
.- $self->_hostname => (POSIX::uname)[1]
- $self->_os => join " - " => (POSIX::uname)[0,2]
- $self->_osname => (POSIX::uname)[0]
- $self->_osvers => (POSIX::uname)[2]
- $self->_cpu_type => (POSIX::uname)[4]
- $self->_cpu => (POSIX::uname)[4]
- $self->_cpu_count => ""
$si->get_os
Returns $self->_os
$si->get_hostname
Returns $self->_hostname
$si->get_cpu_type
Returns $self->_cpu_type
$si->get_cpu
Returns $self->_cpu
$si->get_cpu_count
Returns $self->_cpu_count
$si->get_core_count
Returns $self->get_cpu_count as a number
If
get_cpu_count
returns2 [8 cores]
,get_core_count
returns8
$si->get_dist_name
Returns the name of the distribution.
si_uname (@args)
This class gathers most of the
uname(1)
info, make a comparable version. Takes almost the same arguments:a for all (can be omitted) n for nodename s for os name and version m for cpu name c for cpu count p for cpu_type
$si->old_dump
Just a backward compatible way to dump the object (for test suite).
COPYRIGHT AND LICENSE
(c) 2016-2022, Abe Timmerman & H.Merijn Brand, All rights reserved.
With contributions from Jarkko Hietaniemi, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Module Install Instructions
To install System::Info, copy and paste the appropriate command in to your terminal.
cpanm System::Info
perl -MCPAN -e shell install System::Info
For more information on module installation, please visit the detailed CPAN module installation guide.