Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^5: Check for a new line

by dasgar (Curate)
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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-11-26 00:31 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (693 votes), past polls