SNMP::...Lenovo(3pm)
π SNMP::Info::Layer3::Lenovo π
okay bestie, gather round, because we're talking about SNMP::Info::Layer3::Lenovo β the SNMP interface to Lenovo switches running CNOS. yes, that CNOS. the Lenovo one. slay. π
This page lives in the User Contributed Perl Documentation corner of your man pages, and honestly? iconic.
β¨ AUTHORS β¨
Nick Nauwelaerts wrote this. thank you Nick, we owe you our lives π«Ά
π¦ SYNOPSIS π¦
the classic "let SNMP::Info figure out which subclass you actually need" move:
# Let SNMP::Info determine the correct subclass for you.
use SNMP::Info;
my $cnos = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $cnos->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
literally just hand it the vibes (AutoSpecify => 1) and it goes and sniffs out the right subclass for you. main character energy fr fr β¨
πΈ DESCRIPTION πΈ
It's a subclass for Lenovo switches running CNOS. that's the whole assignment. she does it well. π
π Inherited Classes
SNMP::Info::IEEE802dot3adSNMP::Info::Layer3
she's built different because she's built on those two. periodt.
π Required MIBs
LENOVO-ENV-MIBLENOVO-PRODUCTS-MIB
no MIBs, no info. these are non-negotiable bestie.
π§ Inherited Classes' MIBs
See SNMP::Info::IEEE802dot3ad for its own MIB requirements.
See SNMP::Info::Layer3 for its own MIB requirements.
(go check those pages, they have their own whole list, we're not gonna duplicate it here π)
π GLOBALS π
these are methods that return scalar values straight from SNMP. one value, no table, just a little guy.
$cnos->mac()β returns the base mac, and she gets it fromdot1dBaseBridgeAddress. the classic source. π$cnos->os_ver()β returns the OS version, extracted fromentPhysicalSoftwareRev.1. yes, specifically.1. don't ask, it's just where it lives.
π₯ Overrides
$cnos->vendor()β returns'lenovo'. shocking, I know. π$cnos->os()β returns'cnos'. also shocking. the consistency?? we love to see it.
π Globals imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.
π Globals imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
π TABLE ENTRIES π
these return tables of information, i.e. a reference to a hash. so much data. so much structure. obsessed.
$cnos->agg_ports_cnos()β placeholder function π« it will return theagg_portsmapping once it's implemented. so likeβ¦ not yet bestie. it's giving "coming soon". don't build your whole monitoring stack on it, ngl.
π Overrides
$cnos->i_description()β usesifName, to match most other devices. consistency queen π$cnos->i_name()β usesifDescr, to match most other devices. again: consistency. we love her.$cnos->i_speed()β CNOS does not setifSpeedto4294967295for high speed links, so this returnsorig_if_speed_high()instead. good news:SNMP::Infowill handle this correctly. so you don't have to panic. breathe. π§$cnos->i_speed_raw()β ififSpeedHighis > 2500, we overwritei_speed_raw(), using the formula:ifSpeedHigh*1_000_000. math? in my manpage? more likely than you think. β¨
π¦ Table Methods imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.
π Table Methods imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
reminder bestie: if a thing says "placeholder", it is a placeholder. do not come for me when it returns nothing. π
and that's the page!! you understood the whole thing, I'm so proud π₯Ήπ this was SNMP::...Lenovo(3pm) from perl v5.40.1, dated 2026-02-28, living under User Contributed Perl Documentation. go forth and poll some switches, queen πβ¨
π¦ 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