The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Pulling out top_file statistics via nmsdk

gez

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

gaurav_verma

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())

 

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public