In short, we have several servers on which we run perfoologists monitoring every night. My task is to convert these logs to .csv format and send them to my email address.
This bit is already automated with a .sh script written by a former employee.
What I want to automate is to start a batch job after registering perfmon to look at a specific folder and find the last .blg file and run a sh script on it (a script called upload), so I don’t have to log into each server and do it manually .
eg.
download myInitials cd / cygdrive / someLocation / logs / $ latestFile $ .blg
myInitials and location can be hardcoded ... I just don’t know how to find the last file in a folder and automate all this with a batch file.
Any pointers would be very helpful!
@Jeremiah:
Sorry, I probably should have mentioned in my question that servers have been running since 2003 and 2008.
I do not think it would be absolutely necessary to register a notification of a change in a folder. If the log runs from noon to 7 in the morning, the script will run immediately after (you can set the script to run after the perfmon log log completed in the log properties), so the log will by far be the most recent file in the folder anyway.
, .sh csv e-mail, , cygwin upload xx/cygdrive/location/logs/xyz.blg, , RDC.
!