Hi All,
I am writing a code to monitor running processes and their log files. Suppose I have two Processes: Process_1 and Process_2, logs are Log_1 and Log_2. Everyday process, run it write to same log file. I want to run the program in loop. First run it should point to end of current log. It will finish its first run after looking for Log_1 and Log_2. In next run it (say sleeping for 5 mins) shoud only read the newly added lines in log Log_1 , Log_2 and check for exceptions. It should not read the log file from beginning during each cycle.
i am trying the above code, but it is not working. I am new to perl, so can someone write down a small exact piece of code.