User manual

Using S.M.A.R.T. Disk Monitor 13
SANTOOLS® is registered in US Patent and Trademark Office No 3,107,854 All rights reserved.
Parameter#2 = "HITACHI_DK23EA-60"
Parameter#3 = "JP73338"
Parameter#4 = "\\.\PhysicalDrive0 polled at Sat Aug 06 13:59:07 2005 Status:FAILED - Failure imminent (THIS
IS A TEST)"
Returning with exit code 1234
Launched batch file "C:\Progra~1\Scratch Directory\MyApplicationTest.BAT" which returned user-defined value
1234
C:\Program Files\SMARTMon>
You will note that the path, make/model of the "defective" disk, serial number, and full text message is passed to the
MyApplicationTest batch file, along with the return code. SMARTMon-UX currently ignores he return code, except in
cases where the program failed to launch.
Auto launch Test Batch File (UNIX Family)
The process test is similar to windows.
1. Create a test file called /tmp/MyApplicationTest.sh The contents can be:
#!/bin/sh
echo "Parameter#1 =" "$1"
echo "Parameter#1 =" "$2"
echo "Parameter#1 =" "$3"
echo "Parameter#1 =" "$4"
exit 1234
2. Enter chmod 744 /tmp/MyApplicationTest.sh
3. Enter /etc/smartmon-ux -T -LB /tmp/MyApplicationTest.sh
The MyApplicationTest.sh script will execute in the same manner as the windows batch file, and return similar
output.
Testing Event Log Entries
If you invoke the program with both the -T and the -L flag, a sample alert message will be logged to the smartmon-ux
flat log file . Otherwise, the software will log a test message in the standard Application Event Log on Windows
machines or via the standard syslog mechanism.
1.4.3 Auto-Launching Program After Predictive Failure
This feature, introduced in build 1.29, allows you to specify a program and path that will be launched in the event of a
predictive drive failure (S.M.A.R.T. Error).
In order to specify the program you wish to launch, add to the command-line, -LB ProgramName, where
ProgramName is the fully qualified file name of the program or script/batch file that you wish to launch.
SMARTMon-UX will suspend processing until this program either completes or is terminated. (This is by design, as it
prevents a predictive failure on subsequent polling cycles to re-launch the same script in perpetuity).
Auto-Launch Parameters Passed to Spawned Process
SMARTMon-UX will supply the auto-launch program several variables which can be used to control the action of the
desired program. The parameters are, in order:
1. Physical Device Path ("\\.\PhysicalDrive0", "/dev/sd0", or anything else appropriate for your O/S)
2. Make/Model of Disk ("HITACHI_DK23EA-60")
3. Serial Number of Disk ("JP73339")
4. Full error/warning message("\\.\PhysicalDrive0 polled at Sat Aug 06 13:59:07 2005 Status:FAILED -
Failure imminent")
Implementation Note
If your auto-launch program is something that takes considerable time and overhead, like a backup program, you
would want to insure that the backup program is not run again during the next polling cycle. In order to prevent this,
you may wish to terminate a successful backup with a command that requires operator intervention or just terminates
smartmon-ux. For example, Windows users might wish to end the auto-launch program with the PAUSE command
19