2012-06-27 01:01 PM
This has been discussed in other threads (https://communities.netapp.com/thread/1405). 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?
2012-06-27 02:07 PM
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 = NaElement.new("perf-object-get-instances");
counters = NaElement.new("counters");
instances = NaElement.new("instances");
- Rick -
aggr_perf = s.invoke_elem(pogi);
2012-10-30 06:17 PM
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: https://communities.netapp.com/thread/24839
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.