Combining suggestions from several people.
I installed screen
This gives me an interactive screen that doesn't die when I disconnect the 
session.
Then in the screen session: cu -l /dev/cua00 -t | tee /var/log/log.console
I can then kill my ssh connction, connect again and see that the screen and cu 
processes are still running.
I can tail -f /var/log/log.console to see new output from the console
Bonus: I can reconnect to the screen session to issue interactive commands to 
get more debugging info out of the device.

Thanks all


--- [EMAIL PROTECTED] wrote:

From: Nick Holland <[EMAIL PROTECTED]>
To: misc <misc@openbsd.org>
Subject: Re: Capture serial port output to a file
Date: Tue, 28 Oct 2008 22:03:58 -0400

Marc Balmer wrote:
> * Bruce Bauer wrote:
>> Problem:
>> OpenBSD 4.2 on i386
>> Serial port /dev/cua00 connected to the console port on a firewall.
>> I need to catch all text output from the serial port to a file.
>> The process doing this must survive a loss of network.
>> The box is running headless.
> 
> I could suggest you run cu in a screen session.  I have used
> 
> cu ... | tee logfile
> 
> in the past, but there are possibly more elegant solutions

Not sure it is more elegant, but I mention it just because I was
happy to find out about it: script(1).

It's in base.

Nick.

Reply via email to