Software Development Kit (SDK) and API Discussions

perf-object-get-instances ignoring arguments

This has been discussed in other threads ( I have been teaching myself Ruby and have found that no matter how I try to pass arguments to perf-object-get-instances it will always ignore the counters and instances arguements. For instance, when looking at aggregate performance I have been trying to get the API to return on the total_transfers counter on one aggregate. The following snippet will restrict the output to aggr0, but returns all the counters for that aggregate.

aggr_perf = s.invoke("perf-object-get-instances", "objectname", "aggregate", "instances", "aggr0", "counters", "total_transfers")

aggr_perf.child_get("instances").child_get("instance-data").child_get("counters").children_get.each do |counter|

  puts counter.child_get_string("name") + " ==> " + counter.child_get_string("value")


Perhaps I'm coding this incorrectly?


Re: perf-object-get-instances ignoring arguments

NetApp Alumni

Hi Mathew -

The invoke method doesn't take array inputs.  Please use zexplorer for testing and code generation.  Also the example perf_operatioin.rb in the SDK code example directory is helpful.  In the meantime, the code below should help.

pogi ="perf-object-get-instances");

pogi.child_add_string("objectname", "aggregate");

counters ="counters");

counters.child_add_string("counter", "total_transfers");


instances ="instances");

instances.child_add_string("instance", "aggr0");


   - Rick -


aggr_perf = s.invoke_elem(pogi);

Re: perf-object-get-instances ignoring arguments


Thanks for your post. It pointed me in the right direction, so I was able to code something in Perl. I wrote it up here:

It's probably too late for the original poster, but I'm adding this comment in case it helps someone else when they search the web site.



Re: perf-object-get-instances ignoring arguments

NetApp Alumni

Thanks Chris for an excellent post.  I will put it in my blog.


   - Rick -

Cloud Volumes ONTAP
Review Banner
All Community Forums