upsTestSpinLockgen

GESINGLEUPS-MIB · .1.3.6.1.4.1.818.1.1.10.7.2

Object

scalar r/w SNMPv2-TCTestAndIncr
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:
          
    tryagain:
      get (upsTestSpinLock)
      while (upsTestResultsSummary == inProgress) {
        /* loop while a test is running for another
manager */
        short delay
        get (upsTestSpinLock)
      }
      lockvalue = upsTestSpinLock
      /* no test in progress, start the test */
      set (upsTestSpinLock = lockvalue, upsTestId =
requestedtest)
      if (errorindex == 1) { /* (upsTestSpinLock
failed) */
        /* if problem is not access control, then
            some other manager slipped in ahead of us
*/
        goto tryagain
      }
      if (errorindex == 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 == lockvalue + 1, then
these are our test */
      /* results (as opposed to another manager's */
      The initial value of upsTestSpinLock at agent
initialization shall
      be 1.(*)

Context

MIB
GESINGLEUPS-MIB
OID
.1.3.6.1.4.1.818.1.1.10.7.2
Type
scalar
Access
readwrite
Status
current
Parent
upsTestgen
Siblings
6

Syntax

SNMPv2-TCTestAndIncr
Source
SNMPv2-TCTestAndIncr
Base type
Integer32

Values & Constraints

Type Constraints
range: 0..2147483647

Related Objects

Sibling Objects