stty and resetting ttyp*'s

stty and resetting ttyp*'s

Post by Jordan Ritt » Sun, 06 Oct 1996 04:00:00



Ok fellas, I know I'm not the only admin that's experienced this:

Problem:
        After a machine has been up a while, occasionally a ttyp* will hang.
Maybe this is because it sat there long enough and something got garbled, or
whatever. Who knows.

        I used to fix the hung ttyp* with (for ttyp1) a 'stty stop 1'
followed by a 'stty start 1'. This used to work; lately it has not. No Linux
manual I have (Linux Bible, Linux Unleashed) details to me how actually go
about combatting this problem. I searched web resources, and grep'd howtos
and FAQ's, but to no avail.

Surely someone has to have solved this one.

Jordan Ritter
Human Touch Technologies

 
 
 

stty and resetting ttyp*'s

Post by Alan Cur » Sun, 06 Oct 1996 04:00:00



:Ok fellas, I know I'm not the only admin that's experienced this:
:
:Problem:
:       After a machine has been up a while, occasionally a ttyp* will hang.
:Maybe this is because it sat there long enough and something got garbled, or
:whatever. Who knows.
:
:       I used to fix the hung ttyp* with (for ttyp1) a 'stty stop 1'
:followed by a 'stty start 1'. This used to work; lately it has not. No Linux
:manual I have (Linux Bible, Linux Unleashed) details to me how actually go
:about combatting this problem. I searched web resources, and grep'd howtos
:and FAQ's, but to no avail.

First of all, are you saying that you think the "1" in "stty stop 1" refers
to ttyp1? If so, you're way off. waaaay off... I can't blame you, though,
because there doesn't seem to be any good documentation in any obvious
place for termios and stty. The stty man page should give you SOME clue
what the "1" actually means though.

Lesson 1: stty uses its standard input to determine what tty to act on. So,
if you want to do something to ttyp1, you'll do "stty whatever </dev/ttyp1"
If you don't know what the < means, go back to your "UNIX for Dipshits"
book, please.

Lesson 2: The "stop" and "start" options to stty are used for setting the
flow control characters. The stop character is normally ^S, the start
character is normally ^Q. "stty stop 1" changes the stop character to ^A
(because ^A is character number 1). It has nothing to do with ttyp1, unless
its stdin is ttyp1.

Lesson 3: to quickly reset ttyp1 to default values, "stty sane </dev/ttyp1"
If the termios was the problem, that will fix it. Of course, the problem
may be completely unrelated to termios..

 
 
 

1. 'stty -opost' or 'stty -onlcr' don't work ?!

Which shell?  Many more intelligent shells protect the user from
getting a garbled termios struct after a command terminated and left
it in a weird state.  (I know it from tcsh, but suspect other shells,
too.)

--
J"org Wunsch                                              Unix support engineer

2. highlight problem with C-Kermit in xterm

3. rxvt doesn't reset file permissions of /dev/ttyp*

4. Help with Hard dives etc

5. ttyp* not resetting?

6. Broken pipes and vitual memory problems ? HELP

7. reset,free a ttyp ?

8. What is 'stty', 'term' & 'tty'

9. stty rows and columns not reset for telnet access

10. console driver does not reset char table with "stty sane"

11. Reset console garbage, run stty?.

12. stty -g output mapping to stty -a output