Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lots of TTYHOG OVER-RUN's

671 views
Skip to first unread message

david

unread,
Sep 23, 1997, 3:00:00 AM9/23/97
to

Hi. Just recently, I've started to get lots (~200 at a time) of the
following in 'errpt':

0873CF9F 0922101197 T S pts/44 TTYHOG OVER-RUN
0873CF9F 0922101197 T S pts/44 TTYHOG OVER-RUN

If I grep for that port in 'last', I see the following entries. Note that
utmp/wtmp seems to be getting corrupted, as the entries overlap, and then
all finish at the same time:

dori pts/44 desolation.abc. Sep 19 12:51 - 07:53 (2+19:02)
cindy pts/44 shovel.abc.com Sep 19 12:41 - 07:53 (2+19:11)
david pts/44 stinger.abc.com Sep 19 12:40 - 07:53 (2+19:12)
david pts/44 crowbar.abc.com Sep 19 12:22 - 07:53 (2+19:31)
craigw pts/44 x15.abc.com Sep 19 12:20 - 07:53 (2+19:33)

Does anyone have any idea what's going on here? Is this hurting anything?
Is there a fix?

Thanks for reading.

--David

david

unread,
Sep 24, 1997, 3:00:00 AM9/24/97
to

I forgot some crucial details here: this is a C10 running AIX4.2.1,
and 192Meg ram.

--David

Michael Wojcik

unread,
Sep 25, 1997, 3:00:00 AM9/25/97
to

In article <Pine.HPP.3.95.970922...@jemez.kellogg.nwu.edu> david <da...@jemez.kellogg.nwu.edu> writes:
>Hi. Just recently, I've started to get lots (~200 at a time) of the
>following in 'errpt':
>
>0873CF9F 0922101197 T S pts/44 TTYHOG OVER-RUN
>0873CF9F 0922101197 T S pts/44 TTYHOG OVER-RUN
>
>If I grep for that port in 'last', I see the following entries. Note that
>utmp/wtmp seems to be getting corrupted, as the entries overlap, and then
>all finish at the same time:
>
>dori pts/44 desolation.abc. Sep 19 12:51 - 07:53 (2+19:02)
>cindy pts/44 shovel.abc.com Sep 19 12:41 - 07:53 (2+19:11)
>david pts/44 stinger.abc.com Sep 19 12:40 - 07:53 (2+19:12)
>david pts/44 crowbar.abc.com Sep 19 12:22 - 07:53 (2+19:31)
>craigw pts/44 x15.abc.com Sep 19 12:20 - 07:53 (2+19:33)
>
>Does anyone have any idea what's going on here? Is this hurting anything?
>Is there a fix?

The ttyhog is an I/O buffer for a tty; an overrun, of course, means
that there was too much data to buffer.

With a pts (pseudo tty), as in your case, a ttyhog overrun is often
a sign that someone tried to paste too much text into an xterm. The
default hog size is too small for large pastes. (X hands the xterm
a lot of data, which it then attempts to shove down the pty to the
shell or other process it's running. If the hog is smaller than the
data (possibly adjusted a little if the shell gets a read in), you
get an overrun.)

One fix is to change the hog size in each xterm you run by running a
little program in your .kshrc or other shell initialization file.
For example, my .kshrc has:


if [[ $TERM = *xterm ]]
then
# ttyhog fix for xterm: allow large pastes
/home/mww/tools/misc/sethog
# use pretty attributes for AAI Admin
export AI_ATTRS=UR
fi

And /home/mww/tools/misc/sethog is just a short C program:

/*
* Set the OHOG on the current terminal to 4096 bytes. This allows xterm/
* aixterm to do full-window pastes correctly.
*/

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>

void main(void)
{
int fd, bufsz;

if ((fd = open("/dev/tty", O_RDWR, 0666)) < 0)
{
perror("open");
exit(1);
}
bufsz = 4096;
if (ioctl(fd, TXSETOHOG, &bufsz) < 0)
{
perror("ioctl");
exit(1);
}
exit(0);
}

Michael Wojcik m...@microfocus.com
AAI Development, Micro Focus Inc.
Department of English, Miami University

0 new messages