Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Microsoft Virtualization Discussions

get-naperfdata counters refresh interval?

chriszurich

I'm writing a script which clones volumes which are not being written to via cifs.  I get the cifs write counter using the following line:

$cifs_ops = get-naperfdata -name volume -instances <volume name> -counters cifs_write_ops | select -expandproperty counters | select value

I've run into an issue where the counter value is persistent ie. CIFs copy finishes, counter value in terms of cifs ops = 8000+ when the share is no longer mounted and ops should be 0.  Is there any way to force an update of the counter value through the PowerShell toolkit?

2 REPLIES 2

cknight

Here's a document that describes the various counter types: https://communities.netapp.com/docs/DOC-1044

You're using a rate counter, which is a cumulative value, so to get the rate over a time interval you must sample the value twice (c1 & c2) at times t1 & t2, then use rate = (c2-c1)/(t2-t1).  Or just take two successive samples a short time apart and ensure the counter value didn't change.

Or you can try Invoke-NaSysstat, which uses the same perf APIs and may provide a value that works in your case.

chriszurich

Thanks for the tip Clinton.  I'll try that out. 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public