1Test::Smoke::SysInfo(3)User Contributed Perl DocumentatioTnest::Smoke::SysInfo(3)
2
3
4

NAME

6       Test::Smoke::SysInfo - OO interface to system specific information
7

SYNOPSIS

9           use Test::Smoke::SysInfo;
10
11           my $si = Test::Smoke::SysInfo->new;
12
13           printf "Hostname: %s\n", $si->host;
14           printf "Number of CPU's: %s\n", $si->ncpu;
15           printf "Processor type: %s\n", $si->cpu_type;   # short
16           printf "Processor description: %s\n", $si->cpu; # long
17           printf "OS and version: %s\n", $si->os;
18
19       or
20
21           use Test::Smoke::SysInfo qw( sysinfo );
22           printf "[%s]\n", sysinfo();
23
24       or
25
26           $ perl -MTest::Smoke::SysInfo=tsuname -le print+tsuname
27

DESCRIPTION

29       Sometimes one wants a more eleborate description of the system one is
30       smoking.
31

METHODS

33   Test::Smoke::SysInfo->new( )
34       Dispatch to one of the OS-specific subs.
35
36   __get_os( )
37       This is the short info string about the Operating System.
38
39   __get_cpu_type( )
40       This is the short info string about the cpu-type. The POSIX module
41       should provide one (portably) with "POSIX::uname()".
42
43   __get_cpu( )
44       We do not have a portable way to get this information, so assign
45       "_cpu_type" to it.
46
47   __get_hostname( )
48       Get the hostname from "POSIX::uname()".
49
50   Generic( )
51       Get the information from "POSIX::uname()"
52
53   AIX( )
54       Use the lsdev program to find information.
55
56   HPUX( )
57       Use the ioscan, getconf and machinfo programs to find information.
58
59       This routine was contributed by Rich Rauenzahn.
60
61   BSD( )
62       Use the sysctl program to find information.
63
64   Darwin( )
65       If the system_profiler program is accessible (meaning that this is Mac
66       OS X), use it to find information; otherwise treat as "BSD".
67
68       This sub was donated by Dominic Dunlup.
69
70   IRIX( )
71       Use the hinv program to get the system information.
72
73   __from_proc_cpuinfo( $key, $lines )
74       Helper function to get information from /proc/cpuinfo
75
76   Linux( )
77       Use the "/proc/cpuinfo" pseudofile to get the system information.
78
79   Linux_sparc( )
80       Linux on sparc architecture seems too different from intel
81
82   Linux_ppc( )
83       Linux on ppc architecture seems too different from intel
84
85   Solaris( )
86       Use the psrinfo program to get the system information.  Used also in
87       Tru64 (osf).
88
89   Windows( )
90       Use the %ENV hash to find information. Fall back on the *::Generic
91       values if these values have been unset or are unavailable (sorry I do
92       not have Win9[58]).
93
94       Use Win32::TieRegistry if available to get better information.
95
96   VMS()
97       Use some VMS specific stuff to get system information. These were
98       suggested by Craig Berry.
99
100   sysinfo( )
101       "sysinfo()" returns a string with "host", "os" and "cpu_type".
102
103   tsuname( @args )
104       This class gathers most of the uname(1) info, make a comparable
105       version. Takes almost the same arguments:
106
107           a for all (can be omitted)
108           n for nodename
109           s for os name and version
110           m for cpu name
111           c for cpu count
112           p for cpu_type
113

SEE ALSO

115       Test::Smoke::Smoker, Test::Smoke::Reporter
116
118       (c) 2002-2006, Abe Timmerman <abeltje@cpan.org> All rights reserved.
119
120       With contributions from Jarkko Hietaniemi, Merijn Brand, Campo
121       Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop,
122       Rich Rauenzahn, David Cantrell.
123
124       This library is free software; you can redistribute it and/or modify it
125       under the same terms as Perl itself.
126
127       See:
128
129       ·   http://www.perl.com/perl/misc/Artistic.html
130
131       ·   http://www.gnu.org/copyleft/gpl.html
132
133       This program is distributed in the hope that it will be useful, but
134       WITHOUT ANY WARRANTY; without even the implied warranty of
135       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
136
137
138
139perl v5.12.1                      2009-02-08           Test::Smoke::SysInfo(3)
Impressum