| line | stmt | bran | cond | sub | pod | time | code | 
| 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. | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | Copyright 1999-2015 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 | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | L | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | =cut | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | package Unix::Processors::Info; | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | require DynaLoader; | 
| 64 |  |  |  |  |  |  | @ISA = qw(DynaLoader); | 
| 65 |  |  |  |  |  |  |  | 
| 66 | 1 |  |  | 1 |  | 7 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 33 |  | 
| 67 | 1 |  |  | 1 |  | 5 | use vars qw($VERSION); | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 65 |  | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | ###################################################################### | 
| 70 |  |  |  |  |  |  | #### Configuration Section | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | $VERSION = '2.044'; | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | ###################################################################### | 
| 75 |  |  |  |  |  |  | #### Code | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | #It's all in C | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | ###################################################################### | 
| 80 |  |  |  |  |  |  | #### Package return | 
| 81 |  |  |  |  |  |  | 1; |