Expect: Log by tracing question 
Author Message
 Expect: Log by tracing question

I have been using log by tracing as shown in the Expect book. My question
is: Is there a way to access the output of a spawned processes right before
it dies.
 It seems log by tracing only produces output when it the spawn id is
accessed.


Thu, 28 Apr 2005 03:31:07 GMT  
 Expect: Log by tracing question

Quote:

> I have been using log by tracing as shown in the Expect book. My question
> is: Is there a way to access the output of a spawned processes right before
> it dies.
>  It seems log by tracing only produces output when it the spawn id is
> accessed.

I am guessing that you just want to snarf the last line(s) read before
exiting?
How are you exiting the spawned process.?


Fri, 29 Apr 2005 10:35:06 GMT  
 Expect: Log by tracing question



Quote:
> > I have been using log by tracing as shown in the Expect book. My
question
> > is: Is there a way to access the output of a spawned processes right
before
> > it dies.
> >  It seems log by tracing only produces output when it the spawn id is
> > accessed.

> I am guessing that you just want to snarf the last line(s) read before
> exiting?
> How are you exiting the spawned process.?

When the process terminates ungracefully is the case I am interested in
getting the last few lines for. I have telnet sessions, some times they just
die and in this case loggin the last few lines is the most important in
troubleshooting the reason why the telnet session died.

Thanks!



Fri, 29 Apr 2005 13:11:42 GMT  
 Expect: Log by tracing question

Quote:





> > > I have been using log by tracing as shown in the Expect book. My
>  question
> > > is: Is there a way to access the output of a spawned processes right
>  before
> > > it dies.
> > >  It seems log by tracing only produces output when it the spawn id is
> > > accessed.

> > I am guessing that you just want to snarf the last line(s) read before
> > exiting?
> > How are you exiting the spawned process.?

> When the process terminates ungracefully is the case I am interested in
> getting the last few lines for. I have telnet sessions, some times they just
> die and in this case loggin the last few lines is the most important in
> troubleshooting the reason why the telnet session died.

> Thanks!

Look for expect_after and expect_before in The Book ;), pg 260.
It's still going to take some work to arrange with multiple
id's. See pg.269 for a good example.


Sat, 30 Apr 2005 09:35:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem with logging multiple processes in Expect via trace

2. Expect: Help with Logging by Tracing

3. Another log by tracing question

4. Log by Tracing Question

5. trace log in error

6. Newbie Expect Question: where does Expect store values returned from an expect command

7. log_file in expect :: problem in writing to the log file

8. tcl/expect log problem.

9. Telnet log in TCL/expect

10. Multiple log files using expects log_file command

11. how can remove ^M from Expect log files.

12. Expect: How to log different process to different files

 

 
Powered by phpBB® Forum Software