Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

NT Performance Statistics

Can someone please provide a simple way of getting system statistics (usingh pdh?) for the Windows 2K/XP operating system. I want to be able to provide a string containing the counter name and get the value in return. Possible Use: Getting CPU usage.
0
axia
Asked:
axia
1 Solution
 
axiaAuthor Commented:
i found some code on EE a while ago, but i don't think it works because i tried to use it for CPU usage and it always returned 99%, even if the perfmon program said somthing else. I tried it for various other values and it returned 0. Could someone please post working code?
0
 
rdovCommented:
Getting the CPU usage on Windows NT/2000.
http://www.codepile.com/tric21.shtml

if u like to get memory usage use 'GetProcessMemoryInfo' function.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now