Monday, March 9, 2009

View DSMError.log and DSMSched.log Files Batch File

This batch file has been invaluable to me in checking error and sched logs every day. Drop this into a text file and save it as a batch. When launched the batch file deletes the current Z drive mapping, asks for the server name you would like to view. After entering a server name and hitting enter the batch pings the server and maps a new Z drive to the baclient folder of TSM. It then copies over the DSMError.log and DSMSched.log files to your C:\Temp folders and opens them one at a time starting with the DSMError.log. You have to close the error log for the DSMSched.log to come up. If the batch file cannot map the drive, it may hang or a message in the command line window and then open the last dsm files that were copied. So in a way, it troubleshoots the connection to the server right off the bat.

@echo off
net use z: /delete
Echo View TSM DSMError Logss
Echo Enter the name of the server you would like to view:
SET /p servername=
ping "%servername%"
net use z: "\\%servername%\c$\program files\tivoli\tsm\baclient"
z:
copy "z:\dsmerror.log" "C:\temp"
copy "Z:\dsmsched.log" "C:\temp"
"C:\temp\dsmerror.log"
"C:\temp\dsmsched.log"
quit

No comments:

Post a Comment