PdhValidatePath failed with error c0000bb9

Jayadev C R 1 Reputation point
2021-09-27T09:05:35.723+00:00

I get the following error when I query for "Processor Queue Length" using the PdhValidatePath API.

PdhValidatePath failed with error c0000bb9 for the path: \System\Processor Queue Length.

Any idea, what is going wrong here?

Machine is a physical machine with 2 CPU Sockets (AMD EPYC 7742, 2.25GHz, 64C/128T, Socket SP3
OS is Windows Server 2016 Standard

Method of query is

counter_name= "\System\Processor Queue Length"
PdhValidatePath(counter_name)

PdhValidatePath failed with error c0000bb9 for the path: \System\Processor Queue Length.

PDH_CSTATUS_NO_COUNTER = c0000bb9
The specified counter was not found in the specified object. If this status is returned when the counter is being added, then the counter is not added to the query. If this status is returned after data collection, the data for that counter is invalid. Each time the data is requested, PDH tries to obtain this counter data.

I looked for the path using command below and confirmed that it is present

typeperf -q | findstr System

\System\Processor Queue Length

Another thing is I get 404 error for the below link

https://learn.microsoft.com/en-us/windows/win32/api/pdh/nf-pdh-pdhvalidatepathex

Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,095 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Limitless Technology 39,391 Reputation points
    2021-09-27T16:08:43.617+00:00

    Hello @Jayadev C R

    It all points to a permissions issue to access the counters (not the object but the data). I would recommend to check the elevated permissions of your account, preferably I would make the test with a fresh local account member of Administrators group. If that work, I would be just matter to review the pemissions on the account you are using now.

    Hope this helps with your query,

    ----------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. Jayadev C R 1 Reputation point
    2021-09-28T05:16:20.687+00:00

    Thanks @Limitless Technology . Will check this out and get back.

    0 comments No comments

  3. Jayadev C R 1 Reputation point
    2021-09-28T14:27:20.24+00:00

    We tried with a newly created local user account as member of the Administrator's group and we see the same issue.

    0 comments No comments