[opensuse] How to attach to existing tty
Hi all, This, I guess, is probably a generic Unix question, but in all my Unix years I've never tried to do this, and the manpages have yielded no clue where to start (at least no clue that I recognized as a clue :) I want to attach to the output stream of an existing terminal. I want to "tee" that output to the serial device so I can send it to another machine that will log and save the output. The terminal in question is created and started by "the system". It is acutally /dev/tty10, and is receiving log messages about kernel activity. The problem is that I'm getting a recursive kernel panic, and I want to capture it so I can report the error. This output doesn't seem to be sent to any file anywhere (so far as I can tell), which I guess is reasonable in the event of a panic, as not much of the kernel's behavior will be trustworthy. However, it seems reasonable that I might manage to ship this stuff out of a serial port. Other option suggested was to take a photo of the screen, but the messages disappear off the top of the page (due to the recursive nature of the thing) before I can switch terminals, so this isn't a very useful option. Come to think of it, the last time I had a kernel panic, it was under Solaris, and I used "kdb" to capture it I think (too long ago to remember clearly!) Is there a similar facility in Linux? (Solaris/kdb starts the whole darn kernel under a debugger from the OBP (forth) boot prom prompt). Any suggestions? Cheers, Simon "You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions." — Naguib Mahfouz ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There are multiple ways I can help you: 1. You can try "shared session" by using "screen". (read info pages) On first console tty use "screen", On second console use "screen -x" to attach yourself to shared session (requires login of single user on both tty's.) 2. redirect it "> /dev/ttyX" or use "wall" command. 3. Finally, you can scroll text-terminal up in Linux by using "ctrl+page up". NOTE: works only if you are in non-X-terminal, but real TTY, *and* only if you haven't changed to other tty. Does that helped you ? -Alexey Eremenko. 5.12.2006. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 05 December 2006 11:31, Simon Roberts wrote:
This, I guess, is probably a generic Unix question, No, most Suse users will never do this...
I want to attach to the output stream of an existing terminal. You will need to redirect your console to /dev/tty10... then have another terminal or shell monitor the output (could be as simple as minicom... with history, hung off the machine over a null modem) I've done this plenty of times... in fact... all of my headless boxes have the console directed to the serial port.
The problem is that I'm getting a recursive kernel panic. . . which I guess is reasonable in the event of a panic, as not much of the kernel's behavior will be trustworthy . . . uh, no. A "kernel panic" is a "casters-up" dead-as-a-doorknob condition... the kernel is not running... it has stopped.
-- Kind regards, M Harris <>< -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 05 December 2006 09:55, M Harris wrote:
On Tuesday 05 December 2006 11:31, Simon Roberts wrote:
This, I guess, is probably a generic Unix question,
No, most Suse users will never do this...
I want to attach to the output stream of an existing terminal.
You will need to redirect your console to /dev/tty10... then have another terminal or shell monitor the output (could be as simple as minicom... with history, hung off the machine over a null modem) I've done this plenty of times... in fact... all of my headless boxes have the console directed to the serial port.
The problem is that I'm getting a recursive kernel panic. . . which I guess
is reasonable in the event of a panic, as not much of the kernel's behavior will be trustworthy . . . uh, no. A "kernel panic" is a "casters-up" dead-as-a-doorknob condition... the kernel is not running... it has stopped.
You also mentioned 'kdb' on Solaris. I've not yet used it, but there is a similar program for Linux -- kgdb. It requires two machines and a serial port or ethernet connection between them. Perhaps more than you wanted to get into. See: http://kgdb.linsyssoft.com Jim Cunning -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
The right way:
I want to attach to the output stream of an existing terminal. I want to "tee" that output to the serial device so I can send it to another machine that will log and save the output. The terminal in question is created and started by "the system". It is acutally /dev/tty10, and is receiving log messages about kernel activity.
One or more of these: * Boot with `console=ttyS0 console=tty0` to copy kernel messages to both ttyS0 and the regular console. This should DTRT for Oops and Panics * use net console And optionally: * configure syslog to write to both ttyS0 and tty10 (if you need that)
Other option suggested was to take a photo of the screen, but the messages disappear off the top of the page (due to the recursive nature of the thing) before I can switch terminals, so this isn't a very useful option.
There exist no recursive panics. What you see must be a recursive oops.
Come to think of it, the last time I had a kernel panic, it was under Solaris, and I used "kdb" to capture it I think (too long ago to remember clearly!) Is there a similar facility in Linux? (Solaris/kdb starts the whole darn kernel under a debugger from the OBP (forth) boot prom prompt).
There is also a KDB for Linux, but I am not sure if it is built into the kernel by default (gives me a compile error blech). -`J' -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Alexey Eremenko
-
Jan Engelhardt
-
Jim Cunning
-
M Harris
-
Simon Roberts