Community

Subscribe
Highlighted
Accepted Solution

CP info

Hi,

How can I retrieve information about current CP on the system, using API? Which performance object should I refer?

rle Former NetApp Employee

Re: CP info

Hi Boban,

It looks like the aggregate, disk, and raid group objects have CP counters like:

cp_read_blocks_hdd - Number of blocks read per second during a CP on the aggregate HDD disks

cp_read_blocks_ssd - Number of blocks read per second during a CP on the aggregate SSD disks

cp_reads - Number of reads per second done during a CP to the aggregate

cp_reads_hdd - Number of reads per second done during a CP to the aggregate HDD disks

cp_reads_ssd - Number of reads per second done during a CP to the aggregate SSD disks

Please see my blog for performance counter API examples.

Regards,

   - Rick -

Re: CP info

Thanks for reply, Rick.

I'm not sure if that s helpful to me. I'm planning to poll filer on 1 sec interval, and to get information if CP is performed in that interval and which type (and maybe CP util). That's something similar to sysstat command output.

rle Former NetApp Employee

Re: CP info

Hi Boban,

Sorry for my cDOT assumption.  I don't have a 7-mode system handy.

Polling the filer every 1 second is a burden on ONTAP.  Sysstat can get away with it, because it it internal to ONTAP, and even then, it is not a great idea for the long term.  API calls run through the ZAPI daemon and have to process the request, call the appropriate API, and then return information.  It is more work than sysstat.

If you are still interested in perusing 7-mode APIs, the perf APIs are very similar in 7-mode and cDOT.

Regards,

   - Rick -

Re: CP info

Hi,

I'm already polling ONTAP with 1 second interval and about 20 counters, and results are used for plots, in real time. Do you know which CPU domain is affected by this?

rle Former NetApp Employee

Re: CP info

Network and Kahuna domains would be effected.

You might have to do some calculations to show what sysstat shows.

   - Rick -

Re: CP info

Hi,

I already do calculations to get average CPU, any CPU, disk util etc. But, for that in formations, I know which counters to poll, and do some calculations after that. For CP type and util, I don't even know  which object to look for appropriate counters.

Re: CP info

Hi Boban,

You can best get this info from the counter manager interface.  From the CLI:

sdt-7dot1a> priv set diag

sdt-7dot1a*> stats start -I test wafl:wafl:cp_count

<<waited a min or two>>

sdt-7dot1a*> stats stop -I test                   

StatisticsID: test

wafl:wafl:cp_count.wafl_timer generated CP:12

wafl:wafl:cp_count.snapshot generated CP:0

wafl:wafl:cp_count.wafl_avail_bufs generated CP:0

wafl:wafl:cp_count.dirty_blk_cnt generated CP:0

wafl:wafl:cp_count.full NV-log generated CP:0

wafl:wafl:cp_count.back-to-back CP:0

wafl:wafl:cp_count.flush generated CP:0

wafl:wafl:cp_count.sync generated CP:0

wafl:wafl:cp_count.deferred back-to-back CP:0

wafl:wafl:cp_count.container-indirect-pin CP:0

wafl:wafl:cp_count.low mbufs generated CP:0

wafl:wafl:cp_count.low datavecs generated CP:0

For a scripted solution you would be best to use the API interface every minute or so allowing you to get a count of CP type that occurred over that minute interval.

You would also want to use the SDK, which also includes some sample code for using these perf APIs:

http://support.netapp.com/NOW/download/software/nmsdk/5.2/

Here is an old, but still accurate doc that describes using this interface:

https://communities.netapp.com/servlet/JiveServlet/previewBody/1044-102-2-7517/Performance_Management_DesignGuide.pdf

Hope this helps!

Cheers,

Chris Madden

Storage Architect, NetApp EMEA

Re: CP info

Hi madden,

That's exactly what I want. But I have one problem now because I created low privileged user for only purpose to poll counters via script. It appears that low privileged user can't poll counters for an object that has privilege-level=admin, like wafl object, because I don't get any output, and errors are also not present.

What privilege should be added to poll user to make this possible?

rle Former NetApp Employee

Re: CP info

Hi Boban,

Now that we know what you want, I think you can use the perf APIs to obtain what you want.

The counter object is wafl.

The counter is cp_count. The description is interesting: "Array of counts of different types of CPs"

The cp_count counter is a type delta.  There is also cp_phase_times counter.  I would do a perf-object-instace-list-info with the object name wafl and see what instances are available. I'm hoping that the instance names will match the ones that Chris pointed out.

If that doesn't work, you can look for various counters that are similar like wafl_bufs_available_for_cp.

Regards,

   - Rick -