Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Im trying to pull out stats from counters for the top_file object with python. Basically "statistics show -sample-id xyz" on the ontap cli. I tried using "perf-object-instance-list-info-iter" but I get the error below. Anyone know if this is simply not supported or am I going about this the wrong way? The dev cluster is running 9.4P1.
<results errno='13001' status='failed' reason='This command does not support the "top_file" object and other statistically tracked objects. Please use the "statistics start", "statistics stop", and "statistics show" commands.'/>
</netapp>
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure but I understand it this way. First you need to run "perf-object-start" and then "perf-object-stop" for specified duration(like 1 min). Then you need to run "perf-samples-get-iter" to get the sample details by giving the sample name, you saved with "perf-object-start" command. This is working for me for LIF object but for top_file I gets 0 records.
#starting "perf-object-start"
api = NaElement("perf-object-start")
api.child_add_string("duration","1")
api.child_add_string("max","5")
api.child_add_string("object","top_file")
api.child_add_string("sample-id","f")
xo = s.invoke_elem(api)
#stopping "perf-object"
api1 = NaElement("perf-object-stop")
api1.child_add_string("sample-id","f")
xo1 = s.invoke_elem(api1)
#Getting details for sample "f"
api = NaElement("perf-samples-get-iter")
xi = NaElement("query")
api.child_add(xi)
xi1 = NaElement("sample-info")
xi.child_add(xi1)
xi1.child_add_string("sample-id","f")
xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
print ("Error:\n")
print (xo.sprintf())
sys.exit (1)
print ("Received:\n")
print (xo.sprintf())
