SuperUser
  Posts:26
 |
| 08/02/2004 9:21 PM |
|
Hello, This site is great and I appreciate all the help I get from it. I am currently kicking off a batch file process via a message an am wondering if it is possible to check a log file at the end of it for a particular entry, such as looking for the word "success". Thanks Jeff |
|
|
|
SuperUser
  Posts:26
 |
| 08/03/2004 9:30 AM |
|
| I guess I need some clarification as to how you want to do it... Do you want the batch file to probe the log or use the logAgent or some other method? |
|
|
|
SuperUser
  Posts:26
 |
| 08/03/2004 9:05 PM |
|
I am unfamiliar with the log agent, so if this will suffice, I would be keen to find out how to do that as this would be preferred over using another batch fiel. Or if not possible a batch file will do. Thanks again for you help Jeff |
|
|
|
SuperUser
  Posts:26
 |
| 08/04/2004 8:00 AM |
|
| Ok, let's try and work this out... Give me your requirements, what is it you want to do, why, and what will you be doing with the output? I know you want to search a log for the word "success or succeeded", so we need to determine what you will do when you find it. Trigger another job? Send an email? etc... Once you spell this out I will give you my suggestions and I am sure a few others will too.. |
|
|
|
SuperUser
  Posts:26
 |
| 08/09/2004 4:08 AM |
|
Okay, I currently run a job that calls a batch file on Windows 2000. As part of this Batch process we pipe results to a log file. I need to check the Log file for a word (say the word "success") and then run another job to send an email if it can't find the word ("success"). Thanks again for your help. Jeff |
|
|
|
SuperUser
  Posts:26
 |
| 08/09/2004 9:54 AM |
|
Howdy Are you running your job in Workload? If you are, you can use use Workload to select which email message to send. |
|
|
|
SuperUser
  Posts:26
 |
| 08/12/2004 3:46 AM |
|
Hello, I am running a job in workload which runs a Windows 2000 script (batch file). How do I actually check the file for an entry (the word success) and perform a task from the result ?? Thanks Again Jeff |
|
|
|
SuperUser
  Posts:26
 |
| 08/12/2004 8:35 AM |
|
Jeff I don't know how to search the file for 'success' without the use of a log agent. However if you changed your batch job to produce return codes instead of issuing text to a log file. You can use Workload to monitor your batch job. What happens if you find success in your log file? |
|
|
|
SuperUser
  Posts:26
 |
| 08/16/2004 3:50 AM |
|
it's a case if we don't find the word success we have to raise an alert in Unicenter. The other idea was to look for the word "Failed" and raise an alert from there. I release most programs produce return codes but not sure how to do that from a batch file. Thanks Jeff |
|
|
|
SuperUser
  Posts:26
 |
| 08/16/2004 1:16 PM |
|
Hi Jeff, Your command/batch file would look something like this: for %f in (filename.txt) do find "success" %f if errorlevel 1 goto end cawto "your event message text" :end There are some switches for "find" that you may find useful. Just type "help find" at the command prompt and it'll list them for you. HTH, Don |
|
|
|