# NT version
#
# Ying Shi (yshi+@andrew.cmu.edu)
# Oct, 1999
#
__________
ASSUMPTION

I assume you'd got a brief scan of Dmod functionality which is introduced in the web page (including the talk show linked there) before you downloaded them.
________________
PROGRAMS IN DMOD

- crashMonitor.cpp
	This program monitor system crashes by writing time stamps every INTERVAL seconds on a file.
	It records the time when the program was run for the first time and computes the downtime after crashes.  It estimates the time of the crash within INTERVAL seconds of the actual crash, by using the time when the time stamp file was last modified.

Files created/used/modified by this program
	timeStamp.avail: daily time stamps written every INTERVAL minutes to monitor system crashes
	timeRef.avail: records time when program was started by the first time. Time reference to compute availability
	downTime.avail: preserves the cumulative down time across crashes.
	crashHistory.out: report of outages (date/time)
According to what the  functionality requires, crashmon, for NT, is implemented as a service

- availability.cpp
	This program is run everyday at midnight to create a daily report of the availability and status of the machine.
	Availability is computed using as time reference (t=0) the time when the program that monitors machine crashes (crashMonitor) is executed for the first time. This time is preserved in the file timeRef.avail.
	The status of the machine gives a snapshot of the machine's "performance" by computing the time intervals between the timeStamps created by the program crashMonitor and reporting their offsets (in seconds) from the time interval specified. 
	The availability and status reports are written to the file availability.out and status.out respectively.

Files read by this program:
	- timeStamp.avail: daily time stamps used to monitor system crashes.
	- timeRef.avail:   time reference to compute availability.
	- downTime.avail:  preserves the cumulative down time across crashes.

Files created/updated by this program:
	- availability.out
	- status.out

Future prediction, or Trend Analysis and Fault Prediction, performed by two programs: errorMonitor and trendAnalysis.

- getevent.cpp
	This program reads the system event log using win32 API "readeventlog()" to get the error category or device that caused the error and the time when the error occurred. This information is communicated to the trendAnalysis module through a socket. (Monitor is the server for trendAnalysis)
	The system event log is checked periodically for new entries. 
		
-  trendAnalysis.cpp
	This program reads the error info from a socket, filters the error entries, records the error events and tries to predict if the device that caused the error will fail in the near future. (trendAnalysis is the client of Monitor)

Files created:
	devicename.out : history of warnings issued for that device
			 format: rule fired - time of warning
	devicename.dft : time of last warning issued for that device
			 format: time of last warning

Based on the functionality requirement and user's convenience, we implement the Future prediction module into an NT service as well.
__________________________________________________
WHAT YOU NEED TO DO, AND DO IT IN THE PROPER ORDER

First, construct three projects, crashmon, availcalc, predictor, unless you want to do it manually using command shell compiling.  The files for each project/executable are inside each corresponding folder.  

Start crashmon.exe and predictor.exe(assume these are the name of the executables for crashmonitor and predictor respectively)they way to start a user constructed service, i.e. type "crashmon.exe - i " to install the service and then open the service window from control panel(start up menu) to start the services just installed, don't forget to change their modes into "automatic" from the default value of "manual".

Now you need to schedule the executable "avail.exe" to run every day (i.e. start system scheduler, make sure you make it an 'automatic' service too, provide your schedule content by executing command "AT" followed by one line text editing, e.g. "at 1:00am /every:M,T,W,Th,F,S,Su "C:\winnt\system32\avail.exe" " , the reason you need to put avail.exe under the path of "C:\winnt\system32\" is because it needs to access the files, generated by crashmon.exe who is an NT service, are by default put there, so doing that availability calculation will happen 1:00am every day)

To run this module, you need to access the system event log, so make this able, e.g. run Dmod as root.
_______________________________________________________________________________
NOW THAT YOU'VE READ THIS DESCRIPTION COMPLETELY, YOU'RE READY TO INSTALL DMOD! THANK YOU.

///
///so, if any questions, don't hesitate to send an email to yshi+@andrew.cmu.edu
///  

