Memory Utilization
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 Memory Utilization
Retrieves system memory utilization
node.execute(['show memory utilisation'])
Output
This is an example of the output of the above command:
b'{"%MEM_Util": "13.5"}'
The below table lists and describes input and output attributes:
Attribute | Values | Description |
---|---|---|
"MEM_Util" | float | indicates memory usage |
Note: Output of the API
API will not produce any output unless the below status code in produced, indicating a server error.
Status : 500 -> Response : b'500'