line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cisco::UCS::Blade::CPU; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
17
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
410
|
use Cisco::UCS::Common::EnvironmentalStats; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
7
|
1
|
|
|
1
|
|
4
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
80
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.51'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %V_MAP = ( |
12
|
|
|
|
|
|
|
arch => 'arch', |
13
|
|
|
|
|
|
|
cores => 'cores', |
14
|
|
|
|
|
|
|
coresEnabled => 'cores_enabled', |
15
|
|
|
|
|
|
|
dn => 'dn', |
16
|
|
|
|
|
|
|
id => 'id', |
17
|
|
|
|
|
|
|
model => 'model', |
18
|
|
|
|
|
|
|
operability => 'operability', |
19
|
|
|
|
|
|
|
operQualifierReason => 'operational_reason', |
20
|
|
|
|
|
|
|
operState => 'operational_state', |
21
|
|
|
|
|
|
|
perf => 'perf', |
22
|
|
|
|
|
|
|
power => 'power', |
23
|
|
|
|
|
|
|
presence => 'presence', |
24
|
|
|
|
|
|
|
revision => 'revision', |
25
|
|
|
|
|
|
|
serial => 'serial', |
26
|
|
|
|
|
|
|
socketDesignation => 'socket', |
27
|
|
|
|
|
|
|
speed => 'speed', |
28
|
|
|
|
|
|
|
stepping => 'stepping', |
29
|
|
|
|
|
|
|
thermal => 'thermal', |
30
|
|
|
|
|
|
|
threads => 'threads', |
31
|
|
|
|
|
|
|
vendor => 'vendor', |
32
|
|
|
|
|
|
|
visibility => 'visibility', |
33
|
|
|
|
|
|
|
voltage => 'voltage', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
1
|
|
3
|
{ no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
166
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
while ( my ($attribute, $pseudo) = each %V_MAP ) { |
39
|
|
|
|
|
|
|
*{ __PACKAGE__ .'::'. $pseudo } = sub { |
40
|
0
|
|
|
0
|
|
|
my $self = shift; |
41
|
0
|
|
|
|
|
|
return $self->{$attribute} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub new { |
47
|
0
|
|
|
0
|
0
|
|
my ( $class, $ucs, $args ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
50
|
0
|
|
|
|
|
|
weaken( $self->{ucs} = $ucs ); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
foreach my $var ( keys %$args ) { |
53
|
0
|
|
|
|
|
|
$self->{ $var } = $args->{ $var }; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return $self |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub env_stats { |
60
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
return Cisco::UCS::Common::EnvironmentalStats->new( |
62
|
|
|
|
|
|
|
$self->{ucs}->resolve_dn( |
63
|
|
|
|
|
|
|
dn => "$self->{dn}/env-stats" |
64
|
|
|
|
|
|
|
)->{outConfig}->{processorEnvStats} ) |
65
|
0
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |