Monitoring Tools

4/29/2004; 6:10 PM

My work PC was offended by the rejuvenation of my home PC personally. I was working for most of the day with only 20MB free physical RAM and using 81% of a 700MB swap file. You can imagine the work rate. I knew from an old article that Microsoft have a monitoring tool to monitor performance but I never remembered the name of the tool. I want to prove that I need an upgrade to 1GB of RAM. The solution lay in Microsoft Management Console (MMC). I found a great article on The Elder Geek on Windows XP website to refresh my memory. There is also a good article on the virtual memory paging file.

Here is a brief summary of what I did:-

  1. Opened the performance monitor pre-defined MMC console (Start - Run perfmon.msc)
  2. Created a new system monitor with the following counters
    • Memory - Available Mbytes
    • Memory - Page Reads/sec
    • Memory - Page Writes/sec
    • Paging File - % Usage
    • Paging File - % Usage Peak
    This left me with a graphical monitor of my Memory Settings. You can set the update frequency and some other display options from the (Right Click – Properties) menu.
  3. I needed to output the data in excel so that I can manipulate it better so I created a counter log from the Performance Logs and Alerts snap-in with the same information and redirected the output to a csv file.

Since I’m on the subject of monitoring tools yesterday we had website problems once again, so I decided to monitor the number of apache processes on the machine. I wrote the following script to generate a file that can be easily imported in Excel.

ps -ef | grep httpd | echo `wc` `date` >> /home/ituser/httpdprocesses.log

And then I added a cronjob to run every minute (obviously care must be taken to remove the job once monitoring is finished)

* * * * * /home/ituser/httpdlogscript

The result is something similar to this. The first line contains the number of running httpd processes.

14 139 1112 Tue Apr 20 11:18:01 CEST 2004
14 139 1112 Tue Apr 20 11:19:01 CEST 2004
14 139 1112 Tue Apr 20 11:20:01 CEST 2004
14 139 1112 Tue Apr 20 11:21:01 CEST 2004

Logon

Fill out the form below to logon to this site, or sign up below.

Username (email address):
Password:
I forgot my password; please send me a new one.
 

Signup

Fill out the form below to join as a member of this site.

Screen name:
Email address:
Password:
Repeat password:
Homepage (optional)