KBI 311445 Issue Addressed: Incorrect Free Disk Space Performance Counter Values From Windows


Argent Advanced Technology 3.1A-1601-T17 and earlier


Tuesday, 16 August 2016


Argent AT uses the Windows performance DLL (PDH.dll) to obtain counters, such as Free Disk Space on target machines

Customers may notice some of these counters — such as the Free Disk Space counter mentioned above — are inaccurate at the time of a test

This is a Microsoft Windows issue as the last read Counter Value is cached by PDH.dll

Argent AT correctly gets the performance counter but until the updated value is returned by PDH.dll, Argent will return the cached value of the counter

The issue has been addressed in Argent AT 3.1A-1601-T18

Technical Background

It can be proven that PDH.DLL does NOT update instantaneously when Free Disk Space value changes occur on a target server (Performance Monitor — like Argent — uses PDH.dll)

Screenshots below show a simple test with Performance Monitor polling the Free Disk Space Counter value

It is clear to see that Performance Monitor does not immediately notice the change in Free Disk Space when a large dummy file is created on the target drive, because the value has been cached by PDH.dll

Performance Monitor Counter Value matches System Properties for Free Space on (C:) drive:

Create a large dummy file on the (C:) drive:

Review Performance Monitor Values show old cached values even though System Properties have updated:

In order to overcome the obvious Windows OS issue, Argent checks free space of logical disks by calling Win32 API ‘GetDiskFreeSpaceEx’ on Administrative drives

For example, UNC path \\machine\C$ is used to read metrics of drive C


Upgrade to Argent Advanced Technology 3.1A-1601-T18 or later