NdisGetCurrentProcessorCpuUsage

Hi,
I am calling this function “NdisGetCurrentProcessorCpuUsage” inside my
PacketReceiveIndicate function and it never returns a value higher than
41-42% even when task manager showing 100% or when the system freezes.

How do we use this function? I am trying with NT 4.0 DDK on NT machine. As
per DDK, it can be called either in miniport or in protocol driver.

thanks in advance.
-Raj


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi,

I think the function is never work. You can disassemble the function in Windbg
and look at it how to get counter from CPU. Then you can fix the bug by
writing your own GetCurrentProcessorCpuUsage().

Regards,
Minfeng Li

xxxxx@hotmail.com wrote:

Hi,
I am calling this function “NdisGetCurrentProcessorCpuUsage” inside my
PacketReceiveIndicate function and it never returns a value higher than
41-42% even when task manager showing 100% or when the system freezes.

How do we use this function? I am trying with NT 4.0 DDK on NT machine. As
per DDK, it can be called either in miniport or in protocol driver.

thanks in advance.
-Raj


You are currently subscribed to ntdev as: xxxxx@attbi.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks Li.
If the function never worked, then is Microsoft aware of that, because this function came a long way since NT DDK and still there in XP. Some people here might have tried this function and reported problems.
thanks
Raj

Hi,

I think the function is never work. You can disassemble the function in Windbg
and look at it how to get counter from CPU. Then you can fix the bug by
writing your own GetCurrentProcessorCpuUsage().

Regards,
Minfeng Li

xxxxx@hotmail.com wrote:

Hi,
I am calling this function “NdisGetCurrentProcessorCpuUsage” inside my
PacketReceiveIndicate function and it never returns a value higher than
41-42% even when task manager showing 100% or when the system freezes.

How do we use this function? I am trying with NT 4.0 DDK on NT machine. As
per DDK, it can be called either in miniport or in protocol driver.

thanks in advance.
-Raj