2014-02-26 11:43 AM
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.
- Rick -
2014-02-26 12:00 PM
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.
2014-02-26 12:17 PM
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.
- Rick -
2014-02-27 01:23 AM
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.
2014-02-27 02:14 AM
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
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.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.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:
Here is an old, but still accurate doc that describes using this interface:
Hope this helps!
Storage Architect, NetApp EMEA
2014-02-27 03:16 AM
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?
2014-02-27 02:02 PM
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.
- Rick -