---
oid: "1.3.6.1.2.1.33.1.7.2"
short-description: "upsTestSpinLock OBJECT-TYPE"
last-modified: "2020-03-04"
parent-oid: "1.3.6.1.2.1.33.1.7"
---

## OID: `1.3.6.1.2.1.33.1.7.2`

```asn1
{iso(1) identified-organization(3) dod(6) internet(1) mgmt(2) mib-2(1) upsMIB(33) upsObjects(1) upsTest(7) upsTestSpinLock(2)}
```

### Description

```asn1
upsTestSpinLock 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."
```

**Classification:** MIB object for network management

### Supplementary information

Automatically extracted from IETF [RFC 1628](https://www.rfc-editor.org/rfc/rfc1628.html).

### Child OIDs

No child OID

### Terms of Use

[Terms of use](https://oid-base.com/disclaimer.htm.md)

**Note to implementers:**: The OID repository is constantly updated but does not necessarily store the latest (or most accurate) version of this formal description. For an implementation, it is recommended to search the web for a more recent description. If this is the case, please update the above description.
