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 / C++ / MFC
  4. System Idle State

System Idle State

Scheduled Pinned Locked Moved C / C++ / MFC
questioncss
7 Posts 4 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.
  • A Offline
    A Offline
    aks
    wrote on last edited by
    #1

    Hi, I want to check the system idle state, and want to do some operations on the idle time. I had created a thread to check the system idle state. My idle state conditions are 1. CPU usage must be less than 10% 2. There must be no load on the hard disc. First condition is ok( I can use GetSystemTimes() to get the idle time...pls mention if any other suggessions ) But how can I check the hard disc load? Regards, Ajay:doh:

    G D P 3 Replies Last reply
    0
    • A aks

      Hi, I want to check the system idle state, and want to do some operations on the idle time. I had created a thread to check the system idle state. My idle state conditions are 1. CPU usage must be less than 10% 2. There must be no load on the hard disc. First condition is ok( I can use GetSystemTimes() to get the idle time...pls mention if any other suggessions ) But how can I check the hard disc load? Regards, Ajay:doh:

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      Im sure there are one (or more) performance counters that you can use for disk activity, if not, WMI might be able to help 'g'

      A 1 Reply Last reply
      0
      • G Garth J Lancaster

        Im sure there are one (or more) performance counters that you can use for disk activity, if not, WMI might be able to help 'g'

        A Offline
        A Offline
        aks
        wrote on last edited by
        #3

        yes u r rt and thanks 4 ur suggession. I can use PDH APIs. But I want to know is there any way other than using PDH APIs. And u mentioned about Windows Management Instrumentation. I don't have much knowledge abt it. Can u pls help me? Regards, Ajay:doh:

        1 Reply Last reply
        0
        • A aks

          Hi, I want to check the system idle state, and want to do some operations on the idle time. I had created a thread to check the system idle state. My idle state conditions are 1. CPU usage must be less than 10% 2. There must be no load on the hard disc. First condition is ok( I can use GetSystemTimes() to get the idle time...pls mention if any other suggessions ) But how can I check the hard disc load? Regards, Ajay:doh:

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Ajaywinds wrote:

          I had created a thread to check the system idle state.

          Why not just use GetLastInputInfo()?


          "The largest fire starts but with the smallest spark." - David Crow

          A 1 Reply Last reply
          0
          • D David Crow

            Ajaywinds wrote:

            I had created a thread to check the system idle state.

            Why not just use GetLastInputInfo()?


            "The largest fire starts but with the smallest spark." - David Crow

            A Offline
            A Offline
            aks
            wrote on last edited by
            #5

            thanks 4 ur suggession. Can u pls tell me how can I check the HDD load( other than PDH APIs ) Regards, Ajay:doh:

            1 Reply Last reply
            0
            • A aks

              Hi, I want to check the system idle state, and want to do some operations on the idle time. I had created a thread to check the system idle state. My idle state conditions are 1. CPU usage must be less than 10% 2. There must be no load on the hard disc. First condition is ok( I can use GetSystemTimes() to get the idle time...pls mention if any other suggessions ) But how can I check the hard disc load? Regards, Ajay:doh:

              P Offline
              P Offline
              PJ Arends
              wrote on last edited by
              #6

              Why not do the processing in a subthread created with the THREAD_PRIORITY_IDLE thread priority?


              You may be right
              I may be crazy
              -- Billy Joel --

              Within you lies the power for good, use it!!!

              A 1 Reply Last reply
              0
              • P PJ Arends

                Why not do the processing in a subthread created with the THREAD_PRIORITY_IDLE thread priority?


                You may be right
                I may be crazy
                -- Billy Joel --

                Within you lies the power for good, use it!!!

                A Offline
                A Offline
                aks
                wrote on last edited by
                #7

                hi, but I have my one idle conditions. How can I check that conditions like 1) whether the CPU utilization is less than 10% 2) whethter there is load on HDD regards, ajay

                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