Quantcast
Channel: Windows Performance Toolkit (WPT) v5 forum
Viewing all articles
Browse latest Browse all 275

PdhGetFormattedCounterValue() returns PDH_CALC_NEGATIVE_DENOMINATOR error

$
0
0

Our application is getting PDH_CALC_NEGATIVE_DENOMINATOR from
PdhGetFormattedCounterValue(). The counter path is "\\PhysicalDisk(0 C:)\Disk Reads/sec".

The followings are my findings related to this issue.

Below are the cases when PDH.dll returns PDH_CALC_NEGATIVE_DENOMINATOR error =>
1. The Performance Library is dynamic link library of functions grouped by object. To collect counter data, Performance Monitor calls the Windows NT Registry, which requests the data by using Performance Library functions. Performance Library functions request information from the Windows NT Executive, particularly from the Hardware Abstraction Layer (HAL), a platform-specific DLL.
If Performance Monitor is logging negative time errors, there might be a problem with your HAL DLL. In the past, this has been encountered in some HALs for multiprocessor computers.( machine related)
Reference: MSDN link below
http://technet.microsoft.com/en-us/library/cc749850.aspx


2. Counter Integer overflow – This may be caused by an integer overflow in the counter value, resulting in a larger value being subtracted from a smaller one.
Reference: MSDN link below
http://social.msdn.microsoft.com/Forums/en-US/perfctr/thread/8a0b348f-2c5f-4258-a56a-f79de8e588ec/


3. Restarting the machine /services  the application is using can cause PDH.dll to return negative value if it was accessing some counters at the time of restart.


4. Timeout issue – when server is busy.
The server machine is not a heavy loaded machine where the issue is reproducible.

Also I have seen some reply for this error from web:

They suggesting to try a new version of PDH if the current machine doesn't have...

The PDH.DLL version of problematic server is 5.2.3790.4471

What causes this, and how do we fix it?

Thanks in advance,

Arun Prasath.


Viewing all articles
Browse latest Browse all 275

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>