[racktables-users] Chassi ID / Serial number
- From: killsystem <killsystem@xxxxxxxxxxxxxxxx>
- To: racktables-users@xxxxxxxxxxxxx
- Date: Fri, 16 May 2008 13:35:50 +0200
Since I love the SNMP port finder feature I want to contribute this piece
of code.
It get the chassi id from the switch and modifies the "OEM S/N 1" value.
This should work with mostly every Cisco switch.
The explanation to the OID you will find here
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=.1.3.6.1.4.1.9.3.6.3&translate=Translate&submitValue=SUBMIT
Sry if the mailing list ist not the right place but I couldn't find a way
to create a ticket
This is the diff from ./inc/interface.php version 0.15.0
3833a3834
> $sysChassi = snmpget ($endpoints[0], $community,
'1.3.6.1.4.1.9.3.6.3.0');
3835a3837
> $sysChassi = substr ($sysChassi, strlen ('STRING: '));
3867a3870,3879
>
> if (empty ($attrs[1]['value'])) // OEM Serial
> {
> $sysChassi = ereg_replace ('"', '', $sysChassi);
> $error = commitUpdateAttrValue ($object_id, 1,
$sysChassi);
> if ($error == TRUE)
> $log[] = array ('code' => 'success',
'message' => 'OEM S/N 1 set to ' . $sysChassi);
> else
> $log[] = array ('code' => 'error',
'message' => 'Failed settig OEM S/N 1: ' . $error);
> }
- Follow-Ups:
- [racktables-users] Re: Chassi ID / Serial number
- From: Denis Ovsienko
Other related posts:
- » [racktables-users] Chassi ID / Serial number
- » [racktables-users] Re: Chassi ID / Serial number
- » [racktables-users] Re: Chassi ID / Serial number - Killsystem
- [racktables-users] Re: Chassi ID / Serial number
- From: Denis Ovsienko