Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
Hi,
I recently begin to work on Netapp API to gather Performance monitoring using Perl Ontap API 3.0. I look the perf_operation.pl which is quite complete !
But, I'm looking for a script that can get Per instances performance stats, per example, let say that I would like to query avg_latency for a specific Volume. Following the documentation I should use the API perf-object-get-instances and include parameters such as this example using the Windows command line tool:
manage-ontap-sdk-3.0\bin\nt>apitest.exe netapp01 <USER> <PASSWORD> perf-object-get-instances objectname volume instances vol0 counters avg_latency
The problem here is that the output of the command is ALL counters for All volumes on the filer. I also try this API using Perl and zeplorer.exe; they all ignore instances and counters inputs.
Any idea ? Could it be a API bug ?
Thanks a lot.
I see a similar behavior.. May be its a bug !
I could code around the problem and enhance the perf_operation.pl script to do what you are asking, that is, to query a counter value for a particular volume. Try the attached script.
Syntax :
C:\perl>perf_operation.pl <filer> <user> <pwd> get-instance-counter-value <object> <instance> <counter>
For eg.
C:\perl>perf_operation.pl <filer> <user> <pwd> get-instance-counter-value volume vol0 avg_latency
I face the same issue with the CPP SDK. Is there any fix available?
I am using SDK 3.0.
--Ashit
I dont think there is a fix available. It is a API bug and not dependent on SDK version or langauge used
I'm trying to poll the processor_busy counter from my NetApp simulator using perf_operation.pl. The processor_busy stat is supposed to be a percentage expressed between 0 and 100, but I'm getting a huge number, like 224962027. See listing below:
perl ./perf_operation.pl 192.168.88.131 adminuser adminpass get-counter-values processor processor0 processor_busy
Instance = processor0
Counter Name = processor_busy Counter Value = 224962027
My simulator is running NetApp Release 7.3, and my perl modules are from manage-ontap-sdk-3.5.1.
Is this a known bug?
Thanks for any help.
--Ian
The processor_busy counter value will not be returned in percentage, its
a value which reports the time during which the processor has been
active since an arbitrary point in the past. For more details, refer the
perf API documentation under doc/ontapi/ontapi_/perf/index.html
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
So, looks like I'm a bit slow getting onto this... but 3 years later this still looks to be a problem??
The following still returns all volumes and all counters rather than what was specified.
# ./apitest.rb -x filer200 <user> <password> perf-object-get-instances objectname volume instances scratchpv counters avg_latency
Anyone have any updates?
Regards,
ajt.
The problem is that apitest doesn't take array input. I would try the latest version of zexplorer.
Regards,
- Rick -
This may not help the original poster, but I found out how to do this using Perl. I wrote it up here: https://communities.netapp.com/thread/24839
I downloaded the modified perf_operation.pl script, but it didn't quite do what I wanted. Instead of iterating through the results, I was able to filter out specific statistics and only return those. It's useful if you're coding in Perl, but I have no idea how you'd be able to wrap a command-line interface around that.
Anyway, I'm adding this comment with a link in hopes that it will help someone else.
Chris