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