SNMP::...Timetra(3pm)
π SNMP::Info::Layer3::Timetra β the whole manual, bestie edition π
It's the SNMP::...Timetra(3pm) page, aka the User Contributed Perl Documentation situation, and we're gonna walk through it together. Grab a snack. π
β¨ NAME β¨
SNMP::Info::Layer3::Timetra β the SNMP Interface to Alcatel-Lucent SR. Yes bestie, that's the whole name. π
πΈ AUTHOR πΈ
Bill Fenner wrote this. We stan. π
π¦ SYNOPSIS π¦
Okay so the entire point is: you let SNMP::Info figure out which subclass this poor device belongs to, so you don't have to guess.
# Let SNMP::Info determine the correct subclass for you.
my $alu = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $alu->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
That or die is doing the Lord's work, do not remove it. π
π DESCRIPTION π
It's a subclass for Alcatel-Lucent Service Routers. That's the vibe. That's the whole assignment.
π«Ά Inherited Classes
SNMP::Info::Layer3
π Required MIBs
TIMETRA-GLOBAL-MIBTIMETRA-LLDP-MIBTIMETRA-PORT-MIBTIMETRA-CHASSIS-MIB
π§ Inherited Classes' MIBs
Yeah so, the parent class has its own needs. See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements.
π GLOBALS π
These are the methods that return a scalar value from SNMP. Single values only, no table drama. β¨
$alu->vendor()β Returns'nokia'.$alu->os()β Returns'TiMOS'.$alu->os_ver()β Grabs the version string fromsysDescr.$alu->model()β Tries to combine series and model extracted from$alu->id()to one of the product MIBs.- Removes
tmnxModelfrom the name for readability.
- Removes
$alu->fan()β Return the status of all fans from theTIMETRA-CHASSIS-MIB. Returns a string indicating the number of fans'OK'or identification of any fan without a'Ok'operating status.$alu->ps1_status()β Return the status of the first power supply in each chassis from theTIMETRA-CHASSIS-MIB.$alu->ps2_status()β Return the status of the second power supply in each chassis from theTIMETRA-CHASSIS-MIB.
π Globals imported from SNMP::Info::Layer3
There's more, but it lives at home. See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.
π TABLE METHODS π
These are methods that return tables of information in the form of a reference to a hash. Hashes of hashes, the classic. π§
$alu->i_duplex()β Returns reference to map of IIDs to current link duplex.$alu->i_duplex_admin()β Returns reference to hash of IIDs to admin duplex setting.$alu->agg_ports()β Returns a HASH reference mapping from slave to master port for each member of a port bundle on the device. Keys are ifIndex of the slave ports, Values are ifIndex of the corresponding master ports.
π₯ Overrides
$alu->interfaces()β ReturnsifName, since the default Layer3ifDescrvaries based upon the transceiver inserted.$alu->lldp_if()β Returns the mapping to the SNMP Interface Table. Utilizes (ifIndex) from the (tmnxLldpRemEntry) index.
Not me pointing out that there is a literal trailing space inside that backtick-quoted tmnxLldpRemEntry . It's in the original, so it's staying. Character for character, bestie, that's the rule. π
π LLDP Remote Table (lldpRemTable) uses
- (
TIMETRA-LLDP-MIB::tmnxLldpRemTable) $alu->lldp_rem_id_type()β (tmnxLldpRemChassisIdSubtype)$alu->lldp_rem_id()β (tmnxLldpRemChassisId)$alu->lldp_rem_pid_type()β (tmnxLldpRemPortIdSubtype)$alu->lldp_rem_pid()β (tmnxLldpRemPortId)$alu->lldp_rem_desc()β (tmnxLldpRemPortDesc)$alu->lldp_rem_sysname()β (tmnxLldpRemSysName)$alu->lldp_rem_sysdesc()β (tmnxLldpRemSysDesc)$alu->lldp_rem_sys_cap()β (tmnxLldpRemSysCapEnabled)
π Entity Table
$alu->e_index()β (tmnxHwIndex)$alu->e_class()β Chassis, Module, Fan, Power Supply ...- (
tmnxHwClass)
- (
$alu->e_descr()β Human Friendly- (
tmnxHwName)
- (
$alu->e_fwver()β (tmnxHwFirmwareCodeVersion)$alu->e_fru()β BOOLEAN. Is a Field Replaceable unit?- (
tmnxHwIsFRU)
- (
$alu->e_model()β Model Name of Entity.- (
tmnxHwMfgBoardNumber)
- (
$alu->e_name()β More computer friendly name of entity.- (
tmnxHwName)
- (
$alu->e_parent()β 0 if root.- (
tmnxHwContainedIn)
- (
$alu->e_pos()β The relative position among all entities sharing the same parent.- (
tmnxHwParentRelPos)
- (
$alu->e_serial()β (tmnxHwSerialNumber)$alu->e_swver()β (tmnxHwSoftwareCodeVersion)
π§΅ Table Methods imported from SNMP::Info::Layer3
Again β the parent class has lore. See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
π Data Munging Callback Subroutines π
These ones clean up the messy strings so they don't give you the ick. β¨
$alu->munge_tmnx_state()β Removes'deviceState'or'device'fromTmnxDeviceStatestrings.$alu->munge_tmnx_e_class()β Attempts to normalizetmnxHwClassto anIANAPhysicalClass.$alu->munge_tmnx_e_swver()β Extracts the software version fromtmnxHwSoftwareCodeVersionstring.
And that's the whole page, no skips, no summarising, every last flag and MIB accounted for. π
Okay bye bestie, this one came to you courtesy of perl v5.40.1, dated 2026-02-28 β so yes, it's lowkey from the future, and honestly? Slay. πβ¨
π¦ where this page comes from
- ubuntu stonking: libsnmp-info-perl 3.975000-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms