blib/lib/Unix/Processors/Info.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Processors.xs ↑ Summary
1 # Unix::Processors::Info
2 # See copyright, etc in below POD section.
3 ######################################################################
4  
5 =head1 NAME
6  
7 Unix::Processors::Info - Interface to processor (CPU) information
8  
9 =head1 SYNOPSIS
10  
11 use Unix::Processors;
12  
13 ...
14 $aproc = $proc->processors[0];
15 print ($aproc->id, $aproc->state, $aproc->clock);
16 }
17  
18 =head1 DESCRIPTION
19  
20 This package provides access to per-processor (CPU) information from
21 the operating system in a OS independent manner.
22  
23 =over 4
24  
25 =item id
26  
27 Return the cpu number of this processor.
28  
29 =item clock
30  
31 Return the clock frequency in MHz.
32  
33 =item state
34  
35 Return the cpu state as "online", "offline", or "poweroff".
36  
37 =item type
38  
39 Return the cpu type.
40  
41 =back
42  
43 =head1 DISTRIBUTION
44  
45 The latest version is available from CPAN and from L<http://www.veripool.org/>.
46  
47 Copyright 1999-2017 by Wilson Snyder. This package is free software; you
48 can redistribute it and/or modify it under the terms of either the GNU
49 Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
50  
51 =head1 AUTHORS
52  
53 Wilson Snyder <wsnyder@wsnyder.org>
54  
55 =head1 SEE ALSO
56  
57 L<Unix::Processors>
58  
59 =cut
60  
61 package Unix::Processors::Info;
62  
63 1 require DynaLoader;
64 1 @ISA = qw(DynaLoader);
65  
66 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
67 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
68  
69 ######################################################################
70 #### Configuration Section
71  
72 1 $VERSION = '2.046';
73  
74 ######################################################################
75 #### Code
76  
77 #It's all in C
78  
79 ######################################################################
80 #### Package return
81 1 1;
« Processors.xs ↑ Summary