Tuesday, September 9, 2014

How to Setup Alerts Using Perfmon

Scenario

Say you find that the CPU utilization on your computer or server keeps spiking, but it does so at random times.  If you are looking in task manager, you might be able to identify which process is responsible for the spikes.  Now say you want to be notified when these spikes occur.  You can actually use a built in Microsoft product to send alerts and or log events like this.

Microsoft Performance Monitor.

Using Microsoft's Performance Monitor, you can select counters such as "%Processor Time" or "Handle Count" and then trigger alerts based on these counters. Microsoft has a lot of counters that you can use so that you can monitor computer or server with a high degree of granularity.  Here is an example of the Processor Object containing counters for CPU usage: http://msdn.microsoft.com/en-us/library/ms804036.aspx. You can also monitor memory, disk usage, network usage, etc.

You can set up a data collector set that will allow you to be notified, for example, when a process reaches 60% User Time.  When you do this, you will receive an alert every time this threshold is met.

Unfortunately, while you can setup these alerts to be tripped when a counter reaches a threshold, you can't set it up to alert  you when, say the %Processor reaches X amount for Y duration.

Sunday, September 7, 2014

How to Setup Performance Monitor Data Collector Sets to Monitor System Performance

Scenario

Are you having issues with the performance of your PC or server?  If so, you can use Microsoft's Performance Monitor to see performance trends over a period of time.  In this post, I will talk about how to collect the data you need in order to assess your issue. I will talk more about analysis of the data you collect in other posts.

Overall Steps for Data Collection


  1. Create two DCS.
  2. Start both DCS.
  3. Wait for the performance issue to occur.
  4. After you are sure that you captured data during the problem, stop the DCR.

We will be creating two separate data collector sets.  We will basically create two identical data collector sets.  The only difference between the two sets will be the polling interval.  Performance Monitor data collector sets poll data collectors providers at a whatever interval you specify.  We will set one of the intervals to 2 seconds and the other to 4 minutes.

Why would we do this?

In order to catch problems related to the CPU, we will need to poll at intervals no greater than 3 seconds.  For memory issues, we need the interval to be longer.  We will be creating circular logs which will overwrite the oldest data once they reach their size limit.  In the case of memory issues, we usually want to collect data over a period of days or even weeks.

Thursday, June 19, 2014

Building a Basic Windows 7 Hardware Independent Image


This post should give you the basics in how to build a Windows 7 image that contains drivers for many different models.  Image creation can be fairly straight forward or it can be very involved depending on how much you want to customize it.

What you will need:

  1. Windows 7 Installation CD / DVD
  2. WAIK installed on your computer
  3. A computer to build the image on (if you have VMWare or a HyperV server that would be better)
  4. A USB flash drive large enough to hold your image and WinPE (8 gig drive is OK if your image is pretty thin, 16 gig drive should do it unless your image is really big)

Create Bootable USB with WinPE 3.0


There are endless things you can do with WinPE, but first you must learn to hold it in stillness.

What you will need:

1. Download WAIK from Microsoft and install it on your computer
2. USB Drive (should be at least 512MB)
3. Computer with Windows 7

First, let's create the WinPE files.

1. Go to Start > All Programs > Microsoft Windows AIK - then right click on "Deployment Tools Command Prompt" and select "Run as administrator".

2. At the command line type the following:  "copype x86 c:\winpex86" without the quotes of course.  This will copy the WinPE files to the location c:\winpex86.   If you need to create a 64bit WinPE boot image, then type the following:  "copype amd64 c:\winpex64".

3. Now copy the following file: C:\winpex86\winpe.wim  to the following folder  C:\winpex86\ISO\sources.  After you copy the file in that folder, rename "winpe.wim" to "boot.wim".

Outline for making a Hardware Independent XP Image

For anyone interested in building a hardware independent XP image, here is a quick outline on how to make one.

1. Install Windows XP Pro on a computer that has a multi-processor HAL.  You can determine if your computer is a multiprocessor by right clicking on "My Computer" and then clicking on "Manage".  Then go to "Device Manager" and expand "Computer".

2. Do NOT install third party drivers.

3. Collect drivers from all model desktops you will be supporting.  A good tool to extract drivers can be found here.  There are other utilities that you can use, but this is a good one you can use.  Once you have extracted the drivers from all model's put them all in a folder called "drivers".  This will go in your sysprep folder later on.