⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ups-mib

📁 很不错java的SNMP应用例子
💻
📖 第 1 页 / 共 5 页
字号:
            5 seconds; this may be either a timed shutdown or a            low battery shutdown."    ::= { upsWellKnownAlarms 23 }upsAlarmTestInProgress OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "A test is in progress, as initiated and indicated by            the Test Group.  Tests initiated via other            implementation-specific mechanisms can indicate the            presence of the testing in the alarm table, if            desired, via a OBJECT-IDENTITY macro in the MIB            document specific to that implementation and are            outside the scope of this OBJECT-IDENTITY."    ::= { upsWellKnownAlarms 24 }---- The Test Group--upsTest               OBJECT IDENTIFIER ::= { upsObjects 7 }upsTestId OBJECT-TYPE    SYNTAX     OBJECT IDENTIFIER    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "The test is named by an OBJECT IDENTIFIER which            allows a standard mechanism for the initiation of            tests, including the well known tests identified in            this document as well as those introduced by a            particular implementation, i.e., as documented in the            private enterprise MIB definition for the device.            Setting this variable initiates the named test. Sets            to this variable require the presence of            upsTestSpinLock in the same SNMP message.            The set request will be rejected with an appropriate            error message if the requested test cannot be            performed, including attempts to start a test when            another test is already in progress.  The status of            the current or last test is maintained in            upsTestResultsSummary. Tests in progress may be            aborted by setting the upsTestId variable to            upsTestAbortTestInProgress.            Read operations return the value of the name of the            test in progress if a test is in progress or the name            of the last test performed if no test is in progress,            unless no test has been run, in which case the well            known value upsTestNoTestsInitiated is returned."    ::= { upsTest 1 }-- see [6] for more information on the semantics of objects with-- syntax of TestAndIncrupsTestSpinLock OBJECT-TYPE    SYNTAX     TestAndIncr    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "A spin lock on the test subsystem.  The spinlock is            used as follows.            Before starting a test, a manager-station should make            sure that a test is not in progress as follows:                try_again:                  get (upsTestSpinLock)                  while (upsTestResultsSummary == inProgress) {                    /* loop while a test is running for another            manager */                    short delay                    get (upsTestSpinLock)                  }                  lock_value = upsTestSpinLock                  /* no test in progress, start the test */                  set (upsTestSpinLock = lock_value, upsTestId =            requested_test)                  if (error_index == 1) { /* (upsTestSpinLock            failed) */                    /* if problem is not access control, then                        some other manager slipped in ahead of us            */                    goto try_again                  }                  if (error_index == 2) { /* (upsTestId) */                    /* cannot perform the test */                    give up                  }                  /* test started ok */                  /* wait for test completion by polling            upsTestResultsSummary */                  get (upsTestSpinLock, upsTestResultsSummary,            upsTestResultsDetail)                  while (upsTestResultsSummary == inProgress) {                    short delay                    get (upsTestSpinLock, upsTestResultsSummary,            upsTestResultsDetail)                  }                  /* when test completes, retrieve any additional            test results */                  /* if upsTestSpinLock == lock_value + 1, then            these are our test */                  /* results (as opposed to another manager's */                  The initial value of upsTestSpinLock at agent            initialization shall                  be 1."    ::= { upsTest 2 }upsTestResultsSummary OBJECT-TYPE    SYNTAX     INTEGER {        donePass(1),        doneWarning(2),        doneError(3),        aborted(4),        inProgress(5),        noTestsInitiated(6)    }    MAX-ACCESS read-only    STATUS     current    DESCRIPTION            "The results of the current or last UPS diagnostics            test performed.  The values for donePass(1),            doneWarning(2), and doneError(3) indicate that the            test completed either successfully, with a warning, or            with an error, respectively.  The value aborted(4) is            returned for tests which are aborted by setting the            value of upsTestId to upsTestAbortTestInProgress.            Tests which have not yet concluded are indicated by            inProgress(5).  The value noTestsInitiated(6)            indicates that no previous test results are available,            such as is the case when no tests have been run since            the last reinitialization of the network management            subsystem and the system has no provision for non-            volatile storage of test results."    ::= { upsTest 3 }upsTestResultsDetail OBJECT-TYPE    SYNTAX     DisplayString (SIZE (0..255))    MAX-ACCESS read-only    STATUS     current    DESCRIPTION            "Additional information about upsTestResultsSummary.            If no additional information available, a zero length            string is returned."    ::= { upsTest 4 }upsTestStartTime OBJECT-TYPE    SYNTAX     TimeStamp    MAX-ACCESS read-only    STATUS     current    DESCRIPTION            "The value of sysUpTime at the time the test in            progress was initiated, or, if no test is in progress,            the time the previous test was initiated.  If the            value of upsTestResultsSummary is noTestsInitiated(6),            upsTestStartTime has the value 0."    ::= { upsTest 5 }upsTestElapsedTime OBJECT-TYPE    SYNTAX     TimeInterval    MAX-ACCESS read-only    STATUS     current    DESCRIPTION            "The amount of time, in TimeTicks, since the test in            progress was initiated, or, if no test is in progress,            the previous test took to complete.  If the value of            upsTestResultsSummary is noTestsInitiated(6),            upsTestElapsedTime has the value 0."    ::= { upsTest 6 }---- Well known tests.--upsWellKnownTests     OBJECT IDENTIFIER ::= { upsTest 7 }upsTestNoTestsInitiated OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "No tests have been initiated and no test is in            progress."    ::= { upsWellKnownTests  1 }upsTestAbortTestInProgress OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "The test in progress is to be aborted / the test in            progress was aborted."    ::= { upsWellKnownTests  2 }upsTestGeneralSystemsTest OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "The manufacturer's standard test of UPS device            systems."    ::= { upsWellKnownTests  3 }upsTestQuickBatteryTest OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "A test that is sufficient to determine if the battery            needs replacement."    ::= { upsWellKnownTests  4 }upsTestDeepBatteryCalibration OBJECT-IDENTITY    STATUS     current    DESCRIPTION            "The system is placed on battery to a discharge level,            set by the manufacturer, sufficient to determine            battery replacement and battery run-time with a high            degree of confidence.  WARNING:  this test will leave            the battery in a low charge state and will require            time for recharging to a level sufficient to provide            normal battery duration for the protected load."    ::= { upsWellKnownTests  5 }---- The Control group.--upsControl            OBJECT IDENTIFIER ::= { upsObjects 8 }upsShutdownType OBJECT-TYPE    SYNTAX     INTEGER {        output(1),        system(2)    }    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "This object determines the nature of the action to be            taken at the time when the countdown of the            upsShutdownAfterDelay and upsRebootWithDuration            objects reaches zero.            Setting this object to output(1) indicates that            shutdown requests should cause only the output of the            UPS to turn off.  Setting this object to system(2)            indicates that shutdown requests will cause the entire            UPS system to turn off."    ::= { upsControl 1 }upsShutdownAfterDelay OBJECT-TYPE    SYNTAX     INTEGER (-1..2147483647)    UNITS      "seconds"    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "Setting this object will shutdown (i.e., turn off)            either the UPS output or the UPS system (as determined            by the value of upsShutdownType at the time of            shutdown) after the indicated number of seconds, or            less if the UPS batteries become depleted. Setting            this object to 0 will cause the shutdown to occur            immediately.  Setting this object to -1 will abort the            countdown.  If the system is already in the desired            state at the time the countdown reaches 0, then            nothing will happen.  That is, there is no additional            action at that time if upsShutdownType = system and            the system is already off.  Similarly, there is no            additional action at that time if upsShutdownType =            output and the output is already off.  When read,            upsShutdownAfterDelay will return the number of            seconds remaining until shutdown, or -1 if no shutdown            countdown is in effect.  On some systems, if the agent            is restarted while a shutdown countdown is in effect,            the countdown may be aborted.  Sets to this object            override any upsShutdownAfterDelay already in effect."    ::= { upsControl 2 }upsStartupAfterDelay OBJECT-TYPE    SYNTAX     INTEGER (-1..2147483647)    UNITS      "seconds"    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "Setting this object will start the output after the            indicated number of seconds, including starting the            UPS, if necessary.  Setting this object to 0 will            cause the startup to occur immediately.  Setting this            object to -1 will abort the countdown.  If the output            is already on at the time the countdown reaches 0,            then nothing will happen.  Sets to this object            override the effect of any upsStartupAfterDelay            countdown or upsRebootWithDuration countdown in            progress.  When read, upsStartupAfterDelay will return            the number of seconds until startup, or -1 if no            startup countdown is in effect.  If the countdown            expires during a utility failure, the startup shall            not occur until the utility power is restored.  On            some systems, if the agent is restarted while a            startup countdown is in effect, the countdown is            aborted."    ::= { upsControl 3 }upsRebootWithDuration OBJECT-TYPE    SYNTAX     INTEGER (-1..300)    UNITS      "seconds"    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "Setting this object will immediately shutdown (i.e.,            turn off) either the UPS output or the UPS system (as            determined by the value of upsShutdownType at the time            of shutdown) for a period equal to the indicated            number of seconds, after which time the output will be            started, including starting the UPS, if necessary.  If            the number of seconds required to perform the request            is greater than the requested duration, then the            requested shutdown and startup cycle shall be            performed in the minimum time possible, but in no case            shall this require more than the requested duration            plus 60 seconds.  When read, upsRebootWithDuration            shall return the number of seconds remaining in the            countdown, or -1 if no countdown is in progress.  If            the startup should occur during a utility failure, the            startup shall not occur until the utility power is            restored."    ::= { upsControl 4 }upsAutoRestart OBJECT-TYPE    SYNTAX     INTEGER {        on(1),        off(2)    }    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "Setting this object to 'on' will cause the UPS system            to restart after a shutdown if the shutdown occurred            during a power loss as a result of either a            upsShutdownAfterDelay or an internal battery depleted            condition.  Setting this object to 'off' will prevent            the UPS system from restarting after a shutdown until            an operator manually or remotely explicitly restarts            it.  If the UPS is in a startup or reboot countdown,            then the UPS will not restart until that delay has            been satisfied."    ::= { upsControl 5 }---- The Configuration group.--upsConfig             OBJECT IDENTIFIER ::= { upsObjects 9 }upsConfigInputVoltage OBJECT-TYPE    SYNTAX     NonNegativeInteger    UNITS      "RMS Volts"    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "The magnitude of the nominal input voltage.  On those            systems which support read-write access to this            object, if there is an attempt to set this variable to            a value that is not supported, the request must be            rejected and the agent shall respond with an            appropriate error message, i.e., badValue for SNMPv1,            or inconsistentValue for SNMPv2."    ::= { upsConfig 1 }upsConfigInputFreq OBJECT-TYPE    SYNTAX     NonNegativeInteger    UNITS      "0.1 Hertz"    MAX-ACCESS read-write    STATUS     current    DESCRIPTION            "The nominal input frequency.  On those systems which            support read-write access to this object, if there is            an attempt to set this variable to a value that is not            supported, the request must be rejected and the agent            shall respond with an appropriate error message, i.e.,            badValue for SNMPv1, or inconsistentValue for SNMPv2."    ::= { upsConfig 2 }upsConfigOutputVoltage OBJECT-TYPE

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -