I have had a little experience building subagents with mib2c. mib2c will provide a skeleton of an agent/subagent and it's up to the developer to fill in the implementation-specific details (from your example, mib2c will make a stub function for you to fill in with a real implementation of a function to read the fan state, mib2c has no way to know how to read fan status but if you write a function to read the fan status, mib2c will put in place everything that is needed to arrange for that function to be called when a manager issues an SNMPGET on the OID for that information).
These are things done by a developer, not automatically by the agent. Also, the agent does not have to be created by mib2c, you can just write one, it may be as easy as writing a script and telling snmpd to run it at the appropriate time. Alan -----Original Message----- From: Stuart Kendrick [mailto:stua...@alleninstitute.org] Sent: Thursday, July 09, 2015 5:45 AM To: Martin T Cc: net-snmp-users@lists.sourceforge.net Subject: RE: correlation of MIB files and MIB support on SNMP agents I don't know -- you are roaming past my expertise level here. I look forward to hearing from someone more knowledgeable about this process.--sk-----Original Message-----From: Martin T [mailto:m4rtn...@gmail.com] Sent: Thursday, July 09, 2015 5:43 AMTo: Stuart KendrickCc: net-snmp-users@lists.sourceforge.netSubject: Re: correlation of MIB files and MIB support on SNMP agentsThanks! By "imagine that developers instruct their SNMP agent to read the MIB file(s) and to implement what they see there" you mean that they probably use mib2c or similar utility to convert MIB files into C source code for SNMP agent?thanks,MartinOn 7/9/15, Stuart Kendrick <stua...@alleninstitute.org> wrote:> I would imagine that developers instruct their SNMP agent to read the > MIB> file(s) and to implement what they see there. But I'm speculating.>> One could certainly imagine that there is room for disconnects here! > I have occasionally encountered agents which return values to a query > which aren't defined in the MIB file, for example. [e.g. the MIB file > says that a query to a variable can return integers from 1-5, each mapped to some state ...> but an agent returns '0' or '6'.]>> --sk>> -----Original Message-----> From: Martin T [mailto:m4rtn...@gmail.com]> Sent: Thursday, July 09, 2015 2:08 AM> To: Stuart Kendrick> Cc: net-snmp-users@lists.sourceforge.net> Subject: Re: correlation of MIB files and MIB support on SNMP agents>> One more question- how properly vendors usually keep the MIB files and > MIB support on SNMP agent in correlation? I mean are there sometimes > features listed in MIB files which actually are not present in device > SNMP agent and the other way around?>>> thanks,> Martin>> On 7/9/15, Martin T <m4rtn...@gmail.com> wrote:>> Thanks for excellent answer!>>>>>> Martin>>>> On 7/8/15, Stuart Kendrick <stua...@alleninstitute.org> wrote:>>> Yes, I understand the relationship between SNMP agents & MIB files >>> in the way you and DPS describe below.>>>>>> Rephrasing using my words:>>>>>> - Manufacturer decides to support, say, monitoring fan state. Let's >>> take Cisco as an example>>>>>> - Cisco writes the CISCO-ENVMON-MIB file, including an Object Value >>> which returns the state of a given fan:>>>>>> ciscoEnvMonFanState OBJECT-TYPE>>> SYNTAX CiscoEnvMonState>>> MAX-ACCESS read-only>>> STATUS current>>> DESCRIPTION>>> "The current state of the fan being instrumented.">>> ::= { ciscoEnvMonFanStatusEntry 3 }>>>>>> - Developers use the definitions in that MIB file to write code. I >>> suspect that implementations vary widely -- one possible way to do>>> this:>>> (1) In the Cisco IOS, include support for talking to the hardware in >>> order to report on fan state>>> (2) In the Cisco CLI, include support for some sort of 'show fan state'>>> command>>> (3) In the Cisco SNMP agent, include support for querying fan state>>>>>> - Voila: an operating system which supports reporting on fan state >>> from both the CLI and the SNMP agent.>>>>>> --sk>>>>>> -----Original Message----->>> From: Martin T [mailto:m4rtn...@gmail.com]>>> Sent: Wednesday, July 08, 2015 8:30 AM>>> To: net-snmp-users@lists.sourceforge.net>>> Subject: correlation of MIB files and MIB support on SNMP agents>>>>>> Hi,>>>>>> I read a product pamphlet from DPS Telecom where they had following >>> Q&A>>> section:>>>>>> ----->>> Q: I want to use a device feature that isn’t described in the MIB.>>> What can I do?>>>>>> A: You can ask the vendor to extend the MIB to include this feature.>>> DPS Telecom has extended its MIB to support client needs. But you >>> need to understand that extending a MIB is actually a software >>> development project.>>> The MIB is not just a text file. It’s also a software interface >>> document to the embedded firmware of your SNMP device.>>> Making additions to the MIB requires rewriting the device firmware.>>> This is a serious project, involving writing code, debugging it, and >>> undergoing a thorough quality assurance process.>>> ----->>>>>> So am I correct that vendors like Cisco or Juniper develop their MIB >>> files which are downloadable from their web-sites tightly with their >>> MIB support on SNMP agents? In other words MIB files and MIB support >>> on SNMP agents is closely correlated?>>>>>>>>> thanks,>>> Martin>>>>>> -------------------------------------------------------------------->>> ->>> --------- Don't Limit Your Business. Reach for the Cloud.>>> GigeNET's Cloud Solutions provide you with the tools and support >>> that you need to offload your IT needs and focus on growing your business.>>> Configured For All Businesses. Start Your Cloud Today.>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gigenetcloud.com_&d=AwIGaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=0iZT6Jw1ya3Rv1wOK6aroblC39YJQJs-zXnUqWMyFYc&s=zktFRWVIVO-9bH400nliVkZrdzxJE3kPJoPT47v2Plw&e= >>> _______________________________________________>>> Net-snmp-users mailing list>>> Net-snmp-users@lists.sourceforge.net>>> Please see the following page to unsubscribe or change other options:>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_net-2Dsnmp-2Dusers&d=AwIGaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=0iZT6Jw1ya3Rv1wOK6aroblC39YJQJs-zXnUqWMyFYc&s=7K6piHgqtmtto2Z5muxf8Rl3FopSbVT1YgAItkyzZJA&e= >>>>>>------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gigenetcloud.com_&d=AwIGaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=0iZT6Jw1ya3Rv1wOK6aroblC39YJQJs-zXnUqWMyFYc&s=zktFRWVIVO-9bH400nliVkZrdzxJE3kPJoPT47v2Plw&e= _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_net-2Dsnmp-2Dusers&d=AwIGaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=0iZT6Jw1ya3Rv1wOK6aroblC39YJQJs-zXnUqWMyFYc&s=7K6piHgqtmtto2Z5muxf8Rl3FopSbVT1YgAItkyzZJA&e= ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users