Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How can I retrieve information about current CP on the system, using API? Which performance object should I refer?
Solved! See The Solution
1 ACCEPTED SOLUTION
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Hope this helps!
Cheers,
Chris Madden
Storage Architect, NetApp EMEA
12 REPLIES 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Network and Kahuna domains would be effected.
You might have to do some calculations to show what sysstat shows.
- Rick -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Hope this helps!
Cheers,
Chris Madden
Storage Architect, NetApp EMEA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rick,
Thanks for your help , I appreciate it. Chris's answer is detailed enough so I checked it as correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris,
It points out that this request:
<?xml version="1.0" encoding="UTF-8"?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.19">
<perf-object-get-instances-iter-start>
<objectname>wafl</objectname>
</perf-object-get-instances-iter-start>
</netapp>
Resilt this:
<?xml version='1.0' encoding='UTF-8' ?>
<netapp version='1.1' xmlns='http://www.netapp.com/filer/admin'>
<!-- Output of perf-object-get-instances-iter-start [Execution Time: 94 ms] -->
<results errno='13001' reason='Not enough memory to get instances for wafl.Use perf-object-get-instances-iter-* calls and/or ask for specific counters to limit the amount of data retrieved' status='failed'/>
</netapp>
If I specify instance and object everything is just fine. Thanks a lot, I'll make your answer correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Boban,
The error message you observed is due to some changes in DOT that were introduced in 8.1.3 that is most commonly hit when using Performance Advisor. But, if you call the APIs directly you can hit the same. Here is a support announcement about it that includes links to the related bugs:
https://kb.netapp.com/support/index?page=content&id=7010102&actp=LIST
Glad you got your code working!
Cheers,
Chris
