[ale] "tailing" a /dev?
Joe Steele
joe at madewell.com
Tue Jul 17 19:57:10 EDT 2001
Hmm... I'm not exactly sure if I'm envisioning the same sort of
thing as what you're describing, but:
Earlier this year I was having trouble with sending faxes using
HylaFax software, and I needed to see what data was flowing to/from
the modem in order to figure it out. The obvious solution would
be to add some debugging code to HylaFax. Unfortunately, HylaFax
is written in C++, and, while I've known C for a couple decades,
I've never managed to wrap my mind around C++ (but of course, that's
another thread).
Anyway, I looked for other ways to capture data flowing to/from the
modem, and figured that pseudo-ttys might be useful. A search at
freshmeat.net came up with a couple potential starting points: cotty
and ttysnoop. I eventually hacked on ttysnoop so that its server
could be connected between a pseudo-tty pair and the modem device,
while its client captured the bi-directional data to a file, tagging
it so I knew which way it was flowing. I then had HylaFax talk to the
pseudo-tty instead of the modem. (It did help me to eventually figure
out my problem.)
Such a solution might also work for you, if you are unable to find
anything better. If interested, you are welcome to my ttysnoop patch.
But be warned, it was a quick and dirty fix for my immediate problem,
so it no doubt could use some serious improvements.
--Joe
-----Original Message-----
From: Robert L. Harris [SMTP:Robert.L.Harris at rdlg.net]
Sent: Tuesday, July 17, 2001 2:04 PM
To: Atlanta Linux Enthusiasts
Subject: [ale] "tailing" a /dev?
I am setting up a console server, basically a linux box (2.4.4 for now)
running debian. I'll take ttya from some sun boxes and use a null modem
to connect to my linux box, then use "cu" from the uucp package to remotely
access my consoles.
This process actually works great, I can send breaks, etc and not need
grfx or X or any mess incase a box is badly wedged. The only thing lacking
is the ability to grab any output for when I'm not connected to the
console. I can connect another session and leave it open but that's alot
of hassle and mess for when I have to break that connection and grab the
console.
I need to basically "tail" the output, and idealy any input, on
/dev/ttyS0 for instance. That way if my console spits out some CPU error
or ECC error before a reboot that doesn't log, I can catch it on my
console serve. Idealy it'll tail also so that if one of the admins logs
in and changes something in the middle of the night and doesn't remember
the exact steps, I can just cut, paste, print.
A while back I went digging for console servers and such and never found
anything that worked. Does anyone know how I can do this or a tool that'll
tail the console for me without locking it so I can't access it?
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list