-1

I am using netapp-manageability-sdk-ontap-api-documentation and Java.

I just want to know API name to get storage systems uptime.

Can anybody answer with API name to which I query to storage system??

user3322141
  • 158
  • 6
  • 23

1 Answers1

0

Do something like following: First find out counter name and if it matches to uptime then get assiciated value...

PerfObjectGetInstancesRequest p = new PerfObjectGetInstancesRequest();
PerfObjectGetInstancesResponse resp = apirunner.run(p.withObjectname("system"));
Long uptime = null;
for ( InstanceData instanceInfo : (resp.getInstances()) ) {
  for ( int i = 0 ; i < instanceInfo.getCounters().size() ; i++ ) {
    if ( instanceInfo.getCounters().get(i).getName().equalsIgnoreCase("uptime") ) {
      uptime = Long.parseLong(instanceInfo.getCounters().get(i).getValue());
    }
  }
}
Vishwas
  • 6,967
  • 5
  • 42
  • 69