Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Performance Monitoring on Windows NT

Performance Monitoring on Windows NT

Scheduled Pinned Locked Moved System Admin
questionwindows-adminperformance
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    humps
    wrote on last edited by
    #1

    I would like to programmatically monitor objects, via RegQueryValueEx() / HKEY_PERFORMANCE_DATA. After hours trawling through all the documentation I could find on the web, two things are still confusing me: (1) If I want to monitor a particular object, e.g. Processor, how do I know which object number to pass to RegQueryValueEx() ? I could look up the reg value HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\[LANG]\Counter, but then I cannot assume the string "Processor" is unique (what's to stop a 3rd party app registering its own object or counter called "Processor"?) And obviously the object IDs (numbers) themselves will not be the same on every system (so you can't just hardcode them..) What am I missing here? (2) For my own understanding, where in the registry is the information stored that links object IDs to the performance APIs that they relate to? i.e. When you call RegQueryValueEx(HKEY_PERFORMANCE_DATA,..), Windows has to work out which DLL relates to the object number passed .. so where does it look up the:confused: information ? Many thanks, I'm stumped !! Neil Humphreys.

    I 1 Reply Last reply
    0
    • H humps

      I would like to programmatically monitor objects, via RegQueryValueEx() / HKEY_PERFORMANCE_DATA. After hours trawling through all the documentation I could find on the web, two things are still confusing me: (1) If I want to monitor a particular object, e.g. Processor, how do I know which object number to pass to RegQueryValueEx() ? I could look up the reg value HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\[LANG]\Counter, but then I cannot assume the string "Processor" is unique (what's to stop a 3rd party app registering its own object or counter called "Processor"?) And obviously the object IDs (numbers) themselves will not be the same on every system (so you can't just hardcode them..) What am I missing here? (2) For my own understanding, where in the registry is the information stored that links object IDs to the performance APIs that they relate to? i.e. When you call RegQueryValueEx(HKEY_PERFORMANCE_DATA,..), Windows has to work out which DLL relates to the object number passed .. so where does it look up the:confused: information ? Many thanks, I'm stumped !! Neil Humphreys.

      I Offline
      I Offline
      ian mariano
      wrote on last edited by
      #2

      You probably shouldn't be going after the registry data directly, instead... Start here: Performance Monitoring or use WMI to query the performance data. (See Windows Management Instrumentation, specifically the section on Monitoring Performance Data.)

      Ian Mariano - http://www.ian-space.com/
      "We are all wave equations in the information matrix of the universe" - me

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups