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
  1. Home
  2. General Programming
  3. C#
  4. Performance Counter Instances

Performance Counter Instances

Scheduled Pinned Locked Moved C#
questionsysadminperformancetutorial
3 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.
  • S Offline
    S Offline
    stephen woolhead
    wrote on last edited by
    #1

    OK, I have been play with this on and off all day and can not make it work. How do I define an instance of of a performance counter at runtime? I have the counter defined in the server explorer and can use the counter it's self, but I wish to add intances of the counter, in the same way as, for example, 'Processor/% Idle Time' has. Anyone any ideas? Thanks Stephen

    D 1 Reply Last reply
    0
    • S stephen woolhead

      OK, I have been play with this on and off all day and can not make it work. How do I define an instance of of a performance counter at runtime? I have the counter defined in the server explorer and can use the counter it's self, but I wish to add intances of the counter, in the same way as, for example, 'Processor/% Idle Time' has. Anyone any ideas? Thanks Stephen

      D Offline
      D Offline
      David Stone
      wrote on last edited by
      #2

      Drag it from the Server Explorer onto your form. That will give you a control to work with. David Stone But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*. Shog9

      S 1 Reply Last reply
      0
      • D David Stone

        Drag it from the Server Explorer onto your form. That will give you a control to work with. David Stone But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*. Shog9

        S Offline
        S Offline
        stephen woolhead
        wrote on last edited by
        #3

        I can get a normal performance counter to work no problem, what I cant get to work is the InstanceName property. If I try to access one of the existing performance counters that has multible instances that works, but I can not create my own. Bassically I have this system that can load plug-in modules at run time. I have a custom counter called 'Messages Dispatched' now under that I want to create an instance for each plugin i.e. 'E-Mail', 'SMS' etc, just like under PRocessors you can see an instance of each processor. The documentation said to pass the instance name in the constructor to ProcessCount but that does not work for me. The app starts and perfmon shows no instances, just the root performance count. Thanks Stephen.

        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