I've another one to test you with.

We have apps that create their own text based logs. They include process trace information so can grow very large. We would like to confirm that the application completes it's initialisation but because of the filesizes, do not want to repeatedly search the file once a successful initialisation has been detected until the app is next restarted (and the log file recreated).

Can you please create a script which will monitor a filename (passed as an argument, you may need to give me a little guidance here seeing as I couldn't do this for the Symantec check), and scan for a specific string (also passed as an argument). If the string is not found report a failure, we can then account for the expected application intialisation time within the monitor delay & alarm counts. Once the string is found, report success and record the file creation time for future passes. On future tests, check the creation time first. If it has not changed, go no further & report success. If the creation time has changed (I.e., the application has restarted), restart the process and start looking for the test string again.

If file creation cannot be monitored, then maybe you could check the filesize any restart when it shrinks.

Lastly (against convention), if the file does not exist, report this in the return message, but exit with success (simply means the account is not running and the old log may have been tidied away). Any other error during open should be reported as a failure.

Thanks,
Steve.