Software Development Kit (SDK) and API Discussions

API calls for NFS OPS

BALAGUDURU
5,888 Views

Hi,

 

I am looking to collect NFS IOPS info of all the volumes/qtrees in the Clustered NetApp systems. I couldn't find the api call (command) in the NMSDK matching my requirement. Please let me know if anyone figured it out.

1 ACCEPTED SOLUTION

asulliva
5,873 Views

Hello!

 

To retrive performance information you'll want to use the "perf-object-get-instances" API call.  That API has a number of inputs...to determine the values you'll want to use some other API calls...

 

  • object: the objects which can be queried for perf data, for example aggregates, volumes, disks, protocols, etc.  Use "perf-object-list-info" to get a list of objects on your system.
  • instance: instances of the object which are available, for example, if I query for instances of "aggregate" I would receive a list of aggregate names in return.  Use "perf-object-instance-list-info-iter" to find instances of an object.
  • counters: which counters for the object you want.  Use the "perf-object-counter-list-info" API to get the list of counters for an object.

 

Once you have those three things (object -> instance -> counters) you can query "perf-object-get-instances" for the actual counter values.  Be sure you understand how each counter is calculated as well.  When you query for the counters available for each object it will also tell you the unit and properties, which are used to calculate the value...for reference:

 

  • raw: single counter value is used
  • delta: change in counter value between two samples is used
  • rate: delta divided by the time in seconds between samples is used
  • average: delta divided by the delta of a base counter is used
  • percent: 100*average is used

 

I wrote an article on doing clustered Data ONTAP performance monitoring using PowerShell here.  The concepts are exactly the same (the cmdlets just abstract the API calls), so hopefully you will find it useful.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

5 REPLIES 5

asulliva
5,874 Views

Hello!

 

To retrive performance information you'll want to use the "perf-object-get-instances" API call.  That API has a number of inputs...to determine the values you'll want to use some other API calls...

 

  • object: the objects which can be queried for perf data, for example aggregates, volumes, disks, protocols, etc.  Use "perf-object-list-info" to get a list of objects on your system.
  • instance: instances of the object which are available, for example, if I query for instances of "aggregate" I would receive a list of aggregate names in return.  Use "perf-object-instance-list-info-iter" to find instances of an object.
  • counters: which counters for the object you want.  Use the "perf-object-counter-list-info" API to get the list of counters for an object.

 

Once you have those three things (object -> instance -> counters) you can query "perf-object-get-instances" for the actual counter values.  Be sure you understand how each counter is calculated as well.  When you query for the counters available for each object it will also tell you the unit and properties, which are used to calculate the value...for reference:

 

  • raw: single counter value is used
  • delta: change in counter value between two samples is used
  • rate: delta divided by the time in seconds between samples is used
  • average: delta divided by the delta of a base counter is used
  • percent: 100*average is used

 

I wrote an article on doing clustered Data ONTAP performance monitoring using PowerShell here.  The concepts are exactly the same (the cmdlets just abstract the API calls), so hopefully you will find it useful.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

BALAGUDURU
5,768 Views

Andrew,

 

Thank you for your reply. It really helps me understand the NetApp API.

BALAGUDURU
5,730 Views

Hi Andrew,

 

Ran into an issue while collecting the object instance info. API doen't return anything except saying as passed. Attached is the imageof the output I am getting. Is there something I am missing?Output

 

 

asulliva
5,644 Views

You might want to remove the empty query from the ZAPI call...for example, this works and returns the expected values:

 

<netapp xmlns="http://www.netapp.com/filer/admin" version="1.30">
  <perf-object-instance-list-info-iter>
    <objectname>volume</objectname>
  </perf-object-instance-list-info-iter>
</netapp>

But this does not...it returns no values:

 

<netapp xmlns="http://www.netapp.com/filer/admin" version="1.30">
  <perf-object-instance-list-info-iter>
    <objectname>volume</objectname>
    <filter-data></filter-data>
    <max-records>500</max-records>
    <tag></tag>
    <query>
      <instance-info>
        <name></name>
        <uuid></uuid>
      </instance-info>
    </query>
    <desired-attributes>
      <instance-info>
        <name></name>
        <uuid></uuid>
      </instance-info>
    </desired-attributes>
  </perf-object-instance-list-info-iter>
</netapp>

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

BALAGUDURU
5,637 Views

Andrew,

 

Thank you. It worked.

Public