| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::HPUX::Controllers; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
80009977
|
use strict; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
57
|
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
75
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
367
|
use FusionInventory::Agent::Tools; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
561
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub isEnabled { |
|
9
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
|
10
|
0
|
0
|
|
|
|
0
|
return if $params{no_category}->{controller}; |
|
11
|
0
|
|
|
|
|
0
|
return canRun('ioscan'); |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub doInventory { |
|
15
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
my $inventory = $params{inventory}; |
|
18
|
0
|
|
|
|
|
0
|
my $logger = $params{logger}; |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
0
|
foreach my $type (qw/ext_bus fc psi/) { |
|
21
|
0
|
|
|
|
|
0
|
foreach my $controller (_getControllers( |
|
22
|
|
|
|
|
|
|
command => "ioscan -kFC $type", |
|
23
|
|
|
|
|
|
|
logger => $logger |
|
24
|
|
|
|
|
|
|
)) { |
|
25
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
|
26
|
|
|
|
|
|
|
section => 'CONTROLLERS', |
|
27
|
|
|
|
|
|
|
entry => $controller |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _getControllers { |
|
34
|
4
|
|
|
4
|
|
877
|
my $handle = getFileHandle(@_); |
|
35
|
4
|
50
|
|
|
|
8
|
return unless $handle; |
|
36
|
|
|
|
|
|
|
|
|
37
|
4
|
|
|
|
|
2
|
my @controllers; |
|
38
|
4
|
|
|
|
|
33
|
while (my $line = <$handle>) { |
|
39
|
31
|
|
|
|
|
87
|
my @info = split(/:/, $line); |
|
40
|
31
|
|
|
|
|
96
|
push @controllers, { |
|
41
|
|
|
|
|
|
|
TYPE => $info[17] |
|
42
|
|
|
|
|
|
|
}; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
4
|
|
|
|
|
20
|
close $handle; |
|
45
|
|
|
|
|
|
|
|
|
46
|
4
|
|
|
|
|
19
|
return @controllers; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |