Re: How to expect a string on a log file
- From: comphelp@xxxxxxxxx (Todd H.)
- Date: 28 Mar 2007 13:36:43 -0500
"Atropo" <lxvasquez@xxxxxxxxx> writes:
Sorry, maybe the subject was somehow vague.
what I want is .
I had a process (proc1) with that writes to a log. when this process
came up it writes a "ready" on the log , about 1 or 2 mins later. I
would like to raise another instance (proc2), check the log and wait
for the "ready" string, then kill the old proc1. don't know how to get
out of "tail -f log|grep ready" when it appears. I treated with
"expect" but culdn't find an easy help on it, and to be honest don't
understand a bit of it. Hope you give me some advice or better
approach.
I don't know the answer to your question, but I'm thinking there
simply has to be a better way to do inter-process communication here
than scraping log files with tail and grep and killing processes.
Are both of these running on the same box? What language(s) are you
constrained to if any? This may be a useful opportunity to learn
Perl.
--
Todd H.
http://www.toddh.net/
.
- Follow-Ups:
- Re: How to expect a string on a log file
- From: Atropo
- Re: How to expect a string on a log file
- References:
- How to expect a string on a log file
- From: Atropo
- How to expect a string on a log file
- Prev by Date: How to expect a string on a log file
- Next by Date: Re: How to expect a string on a log file
- Previous by thread: How to expect a string on a log file
- Next by thread: Re: How to expect a string on a log file
- Index(es):
Relevant Pages
|
|