Monday, December 1, 2008

Dummy write to Windows' System event log

I have a Windows 2003 server, let's call it Mystic Hare, which keeps crashing intermittently. The problem I have in diagnosing the problem, is that the last 3 hours of the Windows System logs are always empty.

So either:
1. The last 3 hours of the System log are wiped out during the crash; or
2. There is no event written to the System log during those times.

So I decided to write to the System event log with dummy entries as an experiment.

Googling brings up a lot of VBScripts, JavaScripts, C#, WSH scripts, etc. But I needed a simple app that I can just set in the Windows scheduler. Thank goodness I found what I need at:

The command I'm using is:
> eventcreate /L System /T Information /id 1 /d "For testing only"

This is what I see for the dummy System log entry in the Event Viewer"

No comments: