On Oct 29, 2008, at 2:13 AM, J.C. Roberts wrote:

On Tuesday 28 October 2008, 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


I've never tried using tee(1) but it is more elegant than using the
default solution provided by tip/cu/remote.

I use 'script'. It gets EVERYTHING. You have to do a little post- processing, but it works very well.

However, if you're saying that you want to capture all output on the firewall coming in to /dev/cua00, why not just open the device and read from it? 'tail -f /dev/cua00 > logfile' would do this. Assuming that you have the line dedicated to this and don't need to provide any input.

If you want to use 'cu', you could also investigate the 'record' variable. (~s record /path/to/logfile)

Sean

Reply via email to