Re: something funny about tty's on 2.6.4-rc1-mm1
From: Albert Cahalan
Date: Tue Mar 02 2004 - 14:03:40 EST
> As RBJ said, ptys are now recycled in pid-like fashion,
> which means numbers won't be reused until wraparound
> happens. This is good for security/fault tolerance,
> at least to some minor degree.
Ouch. It's bad for display and bad for typing.
What is easier to type?
ps -t pts/6
ps -t pts/1014962
(and yes, I really type these -- I don't have a
third hand to operate the mouse simultaneously)
What looks better?
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
albert 3339 2114 0 771 1684 0 Feb26 pts/6 00:00:00 bash
albert 3149 2514 0 771 1684 0 Feb26 pts/1004922 00:00:00 bash
albert 3835 2164 0 771 1684 0 Feb26 pts/8 00:00:00 bash
albert 4136 3114 0 771 1684 0 Feb26 pts/1013866 00:00:00 bash
albert 4739 2119 0 771 1684 0 Feb26 pts/9 00:00:00 bash
Better way:
Have a soft limit, initially set at 99. When 2/3 of
the ptys are in use, increase the soft limit to 999,
then to 9999, 99999, and finally to 999999.
This way, a plain 1-person desktop user would never
have a pty name longer than pts/99 and an insanely
busy server could go as high as needed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/