From owner-freebsd-questions@FreeBSD.ORG Wed Dec 13 18:31:34 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9967B16A602 for ; Wed, 13 Dec 2006 18:31:34 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80A4943DE9 for ; Wed, 13 Dec 2006 18:29:27 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-29-241.bredband.comhem.se ([83.253.29.241]:61733 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with smtp (Exim 4.63) (envelope-from ) id 1GuYsZ-0004Dd-5M for freebsd-questions@freebsd.org; Wed, 13 Dec 2006 19:30:56 +0100 Received: (qmail 46324 invoked from network); 13 Dec 2006 19:30:51 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 13 Dec 2006 19:30:51 +0100 Received: (qmail 80158 invoked by uid 1001); 13 Dec 2006 19:30:51 +0100 Date: Wed, 13 Dec 2006 19:30:51 +0100 From: Erik Trulsson To: Eric Brunson Message-ID: <20061213183051.GA79921@owl.midgard.homeip.net> Mail-Followup-To: Eric Brunson , freebsd-questions@freebsd.org References: <45803B96.5090402@brunson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45803B96.5090402@brunson.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1GuYsZ-0004Dd-5M. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1GuYsZ-0004Dd-5M e35084c127098d604c0ef73e2a350209 Cc: freebsd-questions@freebsd.org Subject: Re: Increasing ptys/ttys beyond 128 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 18:31:34 -0000 On Wed, Dec 13, 2006 at 10:42:46AM -0700, Eric Brunson wrote: > I've done some searching on the web, but everything I've come across is > either out of date and says to recompile the kernel, or else says that > after 5.1 the devfs does it automatically. I don't think that's the case. > > I'm running 6.1 and I need more than the [pt]ty[p-sP-S] devices that > will auto-clone in devfs. > > I've tried adding lines like the following to /etc/default/devfs.rules: > > add path 'ptyt*' unhide > add path 'ttyt*' unhide > > But that doesn't do the trick. The syntax "unhide" implies to me that > the [p-sP-S] nodes exist but but are hidden by the hide_all ruleset. > > What do I have to do to allow the creation of more ptys? I don't think you can have more than 256 pty devices in 6.1 The code in the kernel that handles ptys only allow for pty[pqrsPQRS][0-9a-v] (and the corresponding tty[pqrsPQRS][0-9a-v] of course.) This gives you a total of 8*32 = 256 pty devices. (Not 128 as the subjectline implies.) (I don't think you could have more than 256 ptys back in 4.x either, but back then the default setup only gave you 32 ptys, and all the instructions I have seen for increasing that number only told how to let you use all 256 possible devices, but not more than that.) To get more ptys than 256 you will have to start hacking the kernel. (There does seem to be an alternate naming system for ptys available in 7-CURRENT but it has not been back-ported to 6.x. See the pty(4) manpage from -CURRENT for details on how it works.) -- Erik Trulsson ertr1013@student.uu.se