CPU Usage - Perfmon

Posted on 2007-08-01
Medium Priority
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
  • 2
LVL 70

Expert Comment

ID: 19611608
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.

Accepted Solution

Da1King earned 1500 total points
ID: 19611715
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

ID: 19617842
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

Expert Comment

ID: 19619129
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally wrote this article to compare SARDU and YUMI, but have now added Easy2Boot, since that is the one I currently use and find the easiest to create and alter.
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

578 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