System Uptime

Import OPBNOS API

from opbclient import opb_api as opbapi

Initialize client

Use the appropriate JSON file that corresponds to the targetted device name. This JSON file should contain request body parameters corresponding to any potential configuration/post requests.

node = opbapi.connect_to('SN2010')

Get/Show System Uptime

Retrieves system uptime

node.execute(['show uptime'])

Output

This is an example of the output of the above command:

b'{"uptime": "01:05:51 up 26 days, 20:09,  2 users,  load average: 0.54, 0.50, 0.51"}'

The below table lists and describes input and output attributes:

Attribute Values Description
"uptime" "01:05:51 up 26 days, 20:09, 2 users, load average: 0.54, 0.50, 0.51" indicates system uptime information

Note: Output of clock API

API will not produce any output unless the below status code in produced, indicating a server error.

Status : 500 -> Response : b'500'