CPU Usage - Perfmon

Posted on 2007-08-01
Last Modified: 2013-12-10
I have about 15 Servers and I would like to monitor their CPU Usage for about 3 major programs they use, I know i can do this with perfmon, but need some expert assistance in terms of setting it up and logging it and how to retrieve it so i can show it to management.
I looked at perfmon and it doesn't give me a 'CPU Usage' Option but only gives processor time for that .exe under the process counter.
Also, these servers are dual CPU, dual core, so they come up with 4 processors under Win2K3, how can u accurately tell what amount of cpu is being used, this is very important as i need to monitor they usage so mgmt can make a decesion on if we need to upgrade to the quad core servers or not. So assistance in setting this up would highly be appreciated.
Question by:z969307
    LVL 70

    Expert Comment

    Processor time cam be monitored for all processors (cores) together which is probably the best bet, this will effectivly show you how much of the CPU capacity is being used.

    However a better counter in most respects is Processor Queue Length (under system), which shows how may instructions are waiting to be processed. If the Processor Queue Length is 1 for most of the time - occasionally jumps up a bit bit reverts to 1 again quickly then this indicates that the processor is executing the instructions as fast as they can be given to it (regardless of CPU % usage).

    In these circumstances upgrading the processor will not result in any performance benefit since it it already handling instructions as fast as the rest of the system can fetch them.

    if on the other hand Processor Queue Length is more than 1 for long periods then the processor is causing a bottleneck and is slowing down the system as it cannot execute the instructions quickly enough.
    LVL 6

    Accepted Solution

    This should get you started.

    Open perfmon and under 'Performance Logs and Alerts' select 'Counter Logs'
    Right click on the right pane and select 'NewLogSettings' enter 'Processor' for name.
    Take note of the 'Current log file name'
    Click 'Add Counters'

    Here you have two choices.  You can either monitor based on the executable, processors or combination of both.

    Under 'Performance Object' select Processor.  Enable 'Select counters from list'.  Select '%Processor Time'.  On the right you should have _total and numbers ranging from 0 - 3.  This indicates processors 1-4.  Best option is to use _total and click Add.  This will show you what kind of processor usage you are experiencing on your server.  If you want to be as complete as possible.  Select each processor in the instances list and add them as well.  You see the total option AVERAGES the usage across all the processors.  So if one processor is buried at 100% and the others are at 0% then your chart/log will show only 25% usage.

    Under 'Performance Object' select Process'.  Now what you want to do is in the list of 'instances'  highlight the specific process you wish to monitor and click add.  In your case you mentioned three applications.  Highlight the first and click on add and repeat for the next two.

    Once you have those added click on close.

    Next thing is to set the time interval.  If you set it too short you will have an insanely large data log.  Too long and you won't have enough data.  Really this is up to you.  Also remember that this logging is going to eat some of your processor and memory on a production machine as well.  I would start the interval at 5 minutes and see if those results are ok for your.  If you want you can always run it again and set the interval shorter.

    Now we all know that as an admin you need to get your coffee in the morning so you don't want to sit down and get this started first thing.  So click on the Schedule tab at the top and schedule when you want the log to run.

    Once you have everything set click on Ok and you are off to the races.  Your machine is now logging.

    Next day open up perfmon again.  This time you just open up the log file.  Press Ctrl+L.  Select Log Files.  Press Add and navigate to your log file and click ok.  Press Ctrl+I and then add the same performance counters you did when you setup the log.

    Author Comment

    Thanks I did set it up, for some reason it didn't start this morning, I started it manually.
    What I am unable to do is bring up the saved monitored Graphs, after all that data is recorded i want to create a graph of daily usage between 9AM-5PM and then for a whole week, and then a whole month, can you assist with this ? Also when I select the _Total for processors on the vertical scale my program is always at a hundred so i made the max to be 400 is that an accurate representation of the 100% cpu ? thanks
    LVL 6

    Expert Comment

    What you want to do is after you have your server monitored and the log file saved you have to open that log file in perfmon.  The last paragraph demonstrates however to open an already existing log file.

    Now when you add _Total for %Processor Time make sure the scale is set to 1 and the vertical max is 100.  If that value is always pegged at 100 that indicates 100% processor usage.  So if you changed your vertical to 400 you should see the processor line still hovering around 100.

    The way the graph works is it takes the counter value multiplies it by the scale and then prints it on the graph.  For example I used KCTS' Processor Queue Length on my machine.  By default it uses a scale of 10.  However the actual queue length is 3 ave, 2 min, 14 max.  So on my vertical scale it would plot points, 30, 20 and 140 respectively.  Also I am running two instances of Seti@Home that explains the high numbers there.

    Hope that clears things up.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    power requirement for single rack 8 56
    Which monitor should I buy? 9 68
    swaping perc card in DELL PE 2900 5 37
    Refurbished 16 41
    Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
    The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now