From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 1 20:52:01 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCF99106566C for ; Wed, 1 Apr 2009 20:52:01 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 7BA998FC08 for ; Wed, 1 Apr 2009 20:52:01 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C21821CC50; Wed, 1 Apr 2009 22:53:06 +0200 (CEST) Date: Wed, 1 Apr 2009 22:53:06 +0200 From: Ed Schouten To: Steven Hartland Message-ID: <20090401205306.GO13393@hoeg.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Hackers Subject: Re: How to increase the max pty's on Freebsd 7.0? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 20:52:02 -0000 Hi Steven, * Steven Hartland 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 WWW: http://80386.nl/