question

AndrewTurnbull-4341 avatar image
0 Votes"
AndrewTurnbull-4341 asked AndrewTurnbull-4341 commented

SetPerTcpConnectionEstats

I have been using this API function a lot on older versions of windows to collect per connection tcp statistics.

Its behaviour seems to have changed of late. Previously disabling and re-enabling statistics would reset the counters for the statistics. This does not happen any more.

Can anyone point me in the right direction for a better place to ask this question if this forum is the incorrect location.

thanks

windows-api
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I neglected to add that the statistics never seem to get reset

0 Votes 0 ·

Hello, I'm a Windows developer and I can confirm this is a bug. Can I ask what the impact of this bug is for you? Thanks!

0 Votes 0 ·

Hi Matt, thanks for the reply. I have an app that makes extensive use of this API. At the moment I have tried to code around the issue by remembering the last values and then subtracting the current values to get the delta for the items that I know (and not all of them I am sure) are not reset to zero by disabling/enabling estats in newer versions of windows. This kind of works but will blow up eventually when the last value becomes too large. I imagine that this also impacts windows resource monitor as I can see it uses the same API.

Is there a chance that this will get fixed.

0 Votes 0 ·
AndrewTurnbull-4341 avatar image
0 Votes"
AndrewTurnbull-4341 answered

This behavior seems to have been introduced sometime in Windows 10. I have some versions of Windows 10 that behave like this:

1) Enable stats
2) Collect stats
3) Disable stats
4) Enable stats < - at this point all extended tcp stats have returned to zero

And some that do this

1) Enable stats
2) Collect stats
3) Disable stats
4) Enable stats <- at this point extended tcp stats counters remain as they were before step 3

WIndows 2019 seems to follow the second pattern. Some versions of Windows 10 follow the first pattern.

All versions of Windows prior to windows 10 that support TCP estats and that I have tested follow the first pattern.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JoyQiao-MSFT avatar image
0 Votes"
JoyQiao-MSFT answered JoyQiao-MSFT commented

Hi,

According to your description, seems that your issue is more related with development of Windows. Try to create a new thread in Win32 API tag, they might be more familiar with your issue.

Win32 API subforum:
https://docs.microsoft.com/en-us/answers/topics/winapi-general.html


Bests,

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

If any reply is useful for you, please mark it as answer.

Bests,

0 Votes 0 ·