2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

Merge pull request #5292 from cxhong/pduoid

Failed to discover PDU
This commit is contained in:
Victor Hu
2018-06-14 13:19:39 -04:00
committed by GitHub

View File

@ -981,8 +981,14 @@ sub get_snmpvendorinfo {
push @comm_list, 'public';
foreach $comms(@comm_list) {
#get sysDescr.0";
my $ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.47.1.1.1.1.2.1";
#for pdu: get vendor info from sysDescr
#for switches: get vendor info from entPhysicalDescr
my $ccmd;
if (exists($globalopt{pdu})) {
$ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1";
} else {
$ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.47.1.1.1.1.2.1";
}
if (exists($globalopt{verbose})) {
send_msg($request, 0, "Process command: $ccmd\n");
}