Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Check for a new line

by dasgar (Deacon)
on Jan 27, 2014 at 15:46 UTC ( #1072242=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Check for a new line
in thread Check for a new line

My initial thoughts are that "program A" might be the best place to be adding this error checking and logging. Not sure if modifying "program A" is an option.

Another route would be to have the Perl script check periodically to see if "program B" is still running. Of course, this method might not be able to distinguish between a) up and running properly and b) running but not responding.

The only other way that I can think of is to have the Perl script periodically check on the file that "program A" is writing to. You could use something like stat to check for the last modified time stamp. I haven't use this module, but it looks File::Monitor might be another method for checking to see if the file has changed.

Perhaps more knowledgable and experienced monks can come up with better solutions/ideas. Thought I'd toss out these ideas in case one of them might help you out.


Comment on Re^5: Check for a new line

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-07-28 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls