Condition Coverage

blib/lib/Monitoring/GLPlugin/SNMP.pm
Criterion Covered Total %
condition 0 239 0.0


and 3 conditions

line !l l&&!r l&&r condition
47 0 0 0 $self->opts->community and $self->opts->community =~ /^snmpv3(.)(.+)/
51 0 0 0 defined $authprotocol and $authprotocol
53 0 0 0 defined $authpassword and $authpassword
55 0 0 0 defined $privprotocol and $privprotocol
57 0 0 0 defined $privpassword and $privpassword
59 0 0 0 defined $username and $username
61 0 0 0 defined $contextengineid and $contextengineid
63 0 0 0 defined $contextname and $contextname
67 0 0 0 $self->opts->authpassword || $self->opts->authprotocol || $self->opts->privpassword || $self->opts->privprotocol and !$self->opts->protocol eq '3'
217 0 0 0 $self->opts->snmpwalk and $self->opts->hostname
0 0 0 not $self->opts->snmpwalk and $self->opts->hostname
0 0 0 not $self->opts->snmpwalk and $self->opts->hostname and $self->opts->mode eq 'walk'
241 0 0 0 $self->opts->snmpwalk and not $self->opts->hostname
0 0 0 $self->opts->snmpwalk and $self->opts->hostname
291 0 0 0 not $timedout and @trees
343 0 0 0 $self->opts->name and -f $self->opts->name
0 0 0 $self->opts->name and not -f $self->opts->name
738 0 0 0 $self->opts->protocol eq '1' and $mibinfo->[2] ne 'v1'
739 0 0 0 $self->opts->protocol ne '1' and $mibinfo->[2] eq 'v1'
753 0 0 0 substr($_, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} and substr($_, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}, 1) ne '.'
798 0 0 0 defined $self->opts->offline and $self->opts->mode ne 'walk'
860 0 0 0 defined $sysUptime and defined $sysDescr
863 0 0 0 defined $snmpEngineTime and $snmpEngineTime =~ /^\d+$/
0 0 0 defined $snmpEngineTime and $snmpEngineTime =~ /^\d+$/ and $snmpEngineTime > 0
965 0 0 0 defined $self->opts->community2 and $self->decode_password($self->opts->community2) ne $self->decode_password($self->opts->community)
1034 0 0 0 $sysobj and $oid eq $sysobj
1089 0 0 0 $sysobj and $sysobj eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}
1093 0 0 0 $sysobj and $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} eq substr($sysobj, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib})
1130 0 0 0 $traces and not exists $$traces{$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}}
0 0 0 $traces and not exists $$traces{$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}} and grep {substr($_, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib};} keys %{$traces;}
1198 0 0 0 $self->opts->snmpwalk and not $self->opts->hostname
1318 0 0 0 exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib} && exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib}{$table}
1323 0 0 0 defined $filter and not &$filter($new_object)
1330 0 0 0 defined $filter and not &$filter($new_object)
1377 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}
1391 0 0 0 $table and exists $Monitoring::GLPlugin::SNMP::tablecache->{$mib}
1406 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$mo}
1476 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$table}
1478 0 0 0 scalar @{$indices;} == 1 and $indices->[0] == -1
1494 0 0 0 $augmenting_table and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$augmenting_table}
1537 0 0 0 $augmenting_table and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$augmenting_table}
1596 0 0 0 $augmenting_table and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$augmenting_table}
1673 0 0 0 not $self->opts->snmpwalk and scalar @notcached > 0
1812 0 0 0 scalar @{$params{'-columns'};} < 50 and $params{'-endindex'}
0 0 0 scalar @{$params{'-columns'};} < 50 and $params{'-endindex'} and $params{'-startindex'} eq $params{'-endindex'}
1817 0 0 0 not $result and defined $params{'-startindex'}
0 0 0 not $result and defined $params{'-startindex'} and not $params{'-startindex'} =~ /\./
2002 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}{$oid}
2012 0 0 0 defined $result && defined $result->{$oid}
2035 0 0 0 not wantarray and ref \$result eq 'SCALAR'
0 0 0 not wantarray and ref \$result eq 'SCALAR' and ref \$indices eq 'SCALAR'
2078 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'CODE'
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'HASH'
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'HASH' and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}{$result->{$fulloid}}
2102 0 0 0 @{$indices;} and scalar @{$indices;} == 1
0 0 0 @{$indices;} and scalar @{$indices;} == 1 and not defined $indices->[0][0]
2118 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'CODE'
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'HASH'
0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib} and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} and ref $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition} eq 'HASH' and exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}{$definition}{$result->{$oid}}
2222 0 0 0 $_->[0] == $element[0] and $_->[1] == $element[1]
2226 0 0 0 $_->[0] == $element[0] and $_->[1] == $element[1]
0 0 0 $_->[0] == $element[0] and $_->[1] == $element[1] and $_->[2] == $element[2]
2306 0 0 0 defined $filter and not &$filter($new_object)

or 2 conditions

line l !l condition
978 0 0 $factor ||= 10
1464 0 0 $indices ||= []
1465 0 0 $rows ||= []
2153 0 0 $oids ||= []

or 3 conditions

line l !l&&r !l&&!r condition
67 0 0 0 $self->opts->authpassword || $self->opts->authprotocol || $self->opts->privpassword || $self->opts->privprotocol
1044 0 0 0 exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib} or exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}
1231 0 0 0 $force or not -f $statefile
0 0 0 $force or not -f $statefile or (stat $statefile)[9] < $update
1412 0 0 0 $response->{$oid} eq 'noSuchInstance' or $response->{$oid} eq 'noSuchObject'
1419 0 0 0 defined $response->{$oid} or defined $index
2012 0 0 0 not defined $result && defined $result->{$oid} or $result->{$oid} eq 'noSuchInstance'
0 0 0 not defined $result && defined $result->{$oid} or $result->{$oid} eq 'noSuchInstance' or $result->{$oid} eq 'noSuchObject'
0 0 0 not defined $result && defined $result->{$oid} or $result->{$oid} eq 'noSuchInstance' or $result->{$oid} eq 'noSuchObject' or $result->{$oid} eq 'endOfMibView'
2212 0 0 0 $Monitoring::GLPlugin::SNMP::a->[0] <=> $Monitoring::GLPlugin::SNMP::b->[0] or $Monitoring::GLPlugin::SNMP::a->[1] <=> $Monitoring::GLPlugin::SNMP::b->[1]