Email alert using blat with computer management alerts and logs when a process is above a certain memory threshold

Do you like interesting things? Maybe you would like my creation, a Handmade connectible candle called a WickBrick!

Get some here

I wanted an email alert when a process reached a certain memory threshold. I knew I had the handy dandy command line emailer Blat. And I could set an alert using computer management alerts and logs. So it was just a matter of tying the two together.

So created an alert for the process, and set to trigger after private bytes was greater than some number. This alert is named ALERT1. I set it to check every minute for the threshold value.


Next created a bat file called send.bat


c:\blat\blat262\full\blat.exe c:\blat\blat262\full\message.txt -to -s “service needs a reset” -f

logman stop “ALERT1”



(The logman stop command, stops the alert after it fires once)


I also edited the alert to fire off send.bat when it was triggered.


Special note, this was a win2k server so I needed to copy logman.exe and pdh.dll from a windows XP machine in order to make this work.


Yay for alerts.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s