TIME-MACHINE-MIB DEFINITIONS ::= BEGIN -- MIB file created for CS522 semester project. MIB file is based -- largely off the sample code located in the Net-SNMP web site. -- IMPORTS: Include definitions from other mibs here, which is always -- the first item in a MIB file. IMPORTS netSnmpExamples FROM NET-SNMP-EXAMPLES-MIB OBJECT-TYPE, Integer32, MODULE-IDENTITY FROM SNMPv2-SMI MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF; -- -- A brief description and update information about this mib. -- timeMachineMIB MODULE-IDENTITY LAST-UPDATED "200412080000Z" ORGANIZATION "Reese Inc." CONTACT-INFO "UCCS" DESCRIPTION "A MIB created as part of the CS522 project" ::= { netSnmpExamples 4 } -- Define typical mib nodes, like where the objects are going to lie. -- we'll prefix everything in this mib with nst (net snmp tutorial) calendarMIBObjects OBJECT IDENTIFIER ::= { timeMachineMIB 1 } timeMIBObjects OBJECT IDENTIFIER ::= { timeMachineMIB 2 } -- Define the following variables in the MIB tree: -- - month -- - day -- - year dateAgentModules OBJECT IDENTIFIER ::= { calendarMIBObjects 1 } monthAgentObject OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "Represents the month" DEFVAL { 1 } ::= { dateAgentModules 1 } dayAgentObject OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "Represents the day" DEFVAL { 2 } ::= { dateAgentModules 2 } yearAgentObject OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "Represents the year" DEFVAL { 3 } ::= { dateAgentModules 3 } -- Define the following variables in the MIB tree: -- - hour -- - minutes timeAgentModules OBJECT IDENTIFIER ::= { timeMIBObjects 2 } hourAgentObject OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "Represents the number of hours" DEFVAL { 1 } ::= { timeAgentModules 1 } minutesAgentObject OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "Represents the number of minutes" DEFVAL { 2 } ::= { timeAgentModules 2 } -- -- The above definitions produce a section of the mib tree that looks -- like this (including our parent node, printed using the -- snmptranslate command): -- -- -- % snmptranslate -M+. -mNET-SNMP-TUTORIAL-MIB -Tp -IR netSnmpTutorialMIB -- +-netSnmpTutorialMIB(4) -- | -- +-nstMIBObjects(1) -- | | -- | +-nstAgentModules(1) -- | | -- | +- -RW- Integer32 nstAgentModuleObject(1) -- | +- -RW- Integer32 nstAgentSubagentObject(2) -- | +- -RW- Integer32 nstAgentPluginObject(3) -- | -- +-nstMIBConformance(2) -- You can then use the snmptranslate command to get the numerical or -- textual OID representation of any piece of the tree: -- Getting a OID: -- % snmptranslate -M+. -mNET-SNMP-TUTORIAL-MIB -IR nstSSSecondsSinceChanged -- .1.3.6.1.4.1.2021.13.4242.1.1.2 -- Getting a textual OID: -- % snmptranslate -On -M+. -mNET-SNMP-TUTORIAL-MIB -IR nstSSSecondsSinceChanged -- enterprises.ucdavis.ucdExperimental.netSnmpTutorialMIB.nstMIBObjects.nstScalarSet.nstSSSecondsSinceChanged -- Getting a description: -- % snmptranslate -Td -M+. -mNET-SNMP-TUTORIAL-MIB -IR nstSSSecondsSinceChanged -- .1.3.6.1.4.1.2021.13.4242.1.1.2 -- SYNTAX TimeTicks -- UNITS "1/100th Seconds" -- MAX-ACCESS read-only -- STATUS current -- DESCRIPTION "This object indicates the number of 1/100th seconds since the -- nstSSSimpleString object has changed. If it is has never been -- modified, it will be the time passed since the start of the -- agent." -- END: Don't forget this! END