Results 1 to 3 of 3

Thread: [RESOLVED] How to determine processor load?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Posts
    258

    Resolved [RESOLVED] How to determine processor load?

    I have a multi-processing application that kicks off up to 4 threads at a time to process data into a SQL-Server database. It seems to work okay, except at times the processors are pegged at 100% and all threads slow down a bit.

    So, what I want to do is conditionally fire a thread based upon the processor load... if they're already running at 100%, it makes no sense to kick off another thread.

    Is there a way to determine what the processor load is? Task manager shows processor load, so there probably is... but how do I do it?

  2. #2

    Re: How to determine processor load?

    Here's a C# example of getting the CPU Usage.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Posts
    258

    Re: How to determine processor load?

    Okay, that code worked fine. Thanks for posting it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width