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. Get CPU usage and Ram usage without a PerformanceCounter object

Get CPU usage and Ram usage without a PerformanceCounter object

Scheduled Pinned Locked Moved C#
csharpcomperformancequestion
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.
  • J Offline
    J Offline
    jacobjordan
    wrote on last edited by
    #1

    I have attempted to get CPU and RAM usage with a System.Diagnostics.PerformanceCounter, but not only are they a pain in the ass to work with, they don't work the same on different systems. Is there another way to get this information without using a performance counter?

    Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

    L 1 Reply Last reply
    0
    • J jacobjordan

      I have attempted to get CPU and RAM usage with a System.Diagnostics.PerformanceCounter, but not only are they a pain in the ass to work with, they don't work the same on different systems. Is there another way to get this information without using a performance counter?

      Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      I use the Process class rather. Use Process.GetCurrentProcess() to get the current process.

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      J 1 Reply Last reply
      0
      • L leppie

        I use the Process class rather. Use Process.GetCurrentProcess() to get the current process.

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 alpha 4a out now (29 May 2008)

        J Offline
        J Offline
        jacobjordan
        wrote on last edited by
        #3

        Um, not what i want. I don't want to get the current process, i want to get the CPU and memory usage. I have no interest in the current process.

        Giveaway of the day .com ------------------------------------------------------------------ Dream.In.Code | Programmer's Heaven | CodeGuru "Failure is only the opportunity to begin again, this time more wisely."

        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