How to increase the max pty's on Freebsd 7.0?

Ed Schouten ed at 80386.nl
Wed Apr 1 13:52:02 PDT 2009


Hi Steven,

* Steven Hartland <killing at multiplay.co.uk> wrote:
> How can I increase the maximum number or ptys available on FreeBSD 7.0?
>
> It seems that currently the machine is maxing out at 512 but there is
> still loads of capacity left on the machine.
>
> Ideally would like to double at least the number of ttys available,
> any help would be most appreciated.

You can increase the maximum amount of PTYs by editing a lot of source
files on your system. There is some good news: in -CURRENT we switched
to Unix98-style PTYs (/dev/pts/%u). Right now the maximum amount of PTYs
is limited to 1000 (0 to 999).

We're currently limited to 7 characters (pts/999) because our utmp/
wtmp/lastlog files only reserve 8 bytes for the TTY name. If you're
brave enough, you can increase UT_LINESIZE in include/utmp.h and
MAXPTSDEVS in sys/kern/tty_pts.c. Be sure to recompile everything and to
remove your utmp/wtmp/lastlog files.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/


More information about the freebsd-hackers mailing list