Wednesday, October 15, 2008

Health check in Dotnet applications

Introduction: The purpose of this article is to automize some of the activities that are done manually to monitor the health of the Dot net application.

This means writing VBScript program to eliminate some of the below manual activities:

To check the count of rows in some critical tables of DB, this can cause problem if they grow large over the time.
Checking IIS is running or not
Checking specific process is running on the server or not
Checking the application pool status
Check status of taskschduler
Take list of task schedulers on the server


please reach me for code. I can not post my source code here :-0


At a high level I will explain each function achieving the points mentioned in Introduction.

SendMailCDO (toaddress, subject, body):
This Function sends a mail to specified addresses (it can send mail to more than one mail id) with the row count of tables or with the specific errors you are looking in the table.

CheckPoolHealth(Computer): This function will query the IISPoolsettings through vbscript and displays the status as Starting, Running, Stopped etc.,

GetServers(Webserver1): Checks the Task Scheduler service on the server. This function queries the Win32 service and checks whether Task Scheduler Service is running on the server or not.

Function GetStatus(Computer): Checks IIS Status on the server. It queries “microsoftiisv2" on the IISWebserver to know the state of IIS Server.

Function GetProcessStatus (processName, ServerName): Displays the status of the process and memory utilization from the specified server. Mircorsoft provides tools to monitor process information on the server. You can download one of such tools from below url

This tool will check the processes running on that particular server.

Checkout the command it is using to do so

pslist -s \\ServerName ProcessName

PSLIST: This is the tool
-S: Run in task-manager mode, for optional seconds specified. Press Escape to abort. If no number is specified it runs continuously.
ServerName: Specify server name on which this process need to be checked
ProcessName: Specify the process name which needs to be monitored

No comments:

Post a Comment

web counter
Download a free hit counter here.