From nobody@FreeBSD.org Sat Jul 19 15:25:47 2008 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E79AE106566C for ; Sat, 19 Jul 2008 15:25:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C48758FC15 for ; Sat, 19 Jul 2008 15:25:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6JFPlCx076818 for ; Sat, 19 Jul 2008 15:25:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m6JFPlk9076817; Sat, 19 Jul 2008 15:25:47 GMT (envelope-from nobody) Message-Id: <200807191525.m6JFPlk9076817@www.freebsd.org> Date: Sat, 19 Jul 2008 15:25:47 GMT From: Unga To: freebsd-gnats-submit@FreeBSD.org Subject: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 X-Send-Pr-Version: www-3.1 X-GNATS-Notify: >Number: 125772 >Category: docs >Synopsis: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 >Confidential: no >Severity: serious >Priority: low >Responsible: pgj >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 19 15:30:00 UTC 2008 >Closed-Date: Tue Jul 29 18:30:31 UTC 2008 >Last-Modified: Tue Jul 29 18:30:31 UTC 2008 >Originator: Unga >Release: FreeBSD 7.0 >Organization: >Environment: >Description: As per FAQ, http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html, I tried to increase the number of ptys: "10.19.1 Build and install a new kernel with the line in the configuration file: device pty N where N is the number of requested pseudoterminals." I tried to recompile the kernel. I have modified the GENERIC as follows: device pty 64 # Pseudo-ttys (telnet etc) This results a compilation error: config: /usr/src/sys/i386/conf/GENERIC:268: syntax error *** Error code 1 >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-doc->pgj Responsible-Changed-By: pgj Responsible-Changed-When: Sat Jul 19 15:32:01 UTC 2008 Responsible-Changed-Why: I think it is my fault, so I should fix this. http://www.freebsd.org/cgi/query-pr.cgi?pr=125772 From: John Baldwin To: freebsd-doc@freebsd.org Cc: Unga , freebsd-gnats-submit@freebsd.org Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Mon, 21 Jul 2008 11:21:28 -0400 > This results a compilation error: > config: /usr/src/sys/i386/conf/GENERIC:268: syntax error > *** Error code 1 Yeah, that approach (number in config file) hasn't been used since at least 3.x. The default on 7.0 is 512 pty's (vs 256 in 6.x). Do you need more than that? -- John Baldwin From: Gabor PALI To: John Baldwin , bug-followup@FreeBSD.org Cc: Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Wed, 23 Jul 2008 20:03:33 +0200 This is a multi-part message in MIME format. --------------020102060503000706000005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Here is a patch based on what we have discussed earlier. --------------020102060503000706000005 Content-Type: text/plain; name="books.faq.ptys.patch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="books.faq.ptys.patch.diff" Index: book.sgml =================================================================== RCS file: /doc/en_US.ISO8859-1/books/faq/book.sgml,v retrieving revision 1.1075 diff -u -u -r1.1075 book.sgml --- book.sgml 19 Jul 2008 07:42:11 -0000 1.1075 +++ book.sgml 23 Jul 2008 17:57:01 -0000 @@ -6290,43 +6290,26 @@ - If you have lot of telnet, ssh, X, or screen users, - you will probably run out of pseudoterminals. Here is how to - add more: - - - - Build and install a new kernel with the line in - the configuration file: - - device pty N - - where N is the number - of requested pseudoterminals. - - - - Edit /etc/ttys and add lines - for each of the N terminals. They should match the form - of the existing entries, i.e. they look like this: - - ttyqc none network - - The order of the letter designations is - tty[pqrsPQRSlmnoLMNO][0123456789abcdefghijklmnopqrstuv], using a - regular expression. - - - - Reboot the system with the new kernel and you are - ready to go. - - + If you have lot of telnet, + ssh, X, or screen + users, you will probably run out of pseudoterminals. There + is lot of them available in the recent base installations by + default, so the chances are low that you will have to + increase their number indeed. - Using more than 256 (up to 512) &man.pty.4; devices requires - &os; 6.3 or later. + If you want to use more than 256 (up to 512) + &man.pty.4; devices that will require &os; 6.3 and + &os; 7.0 or later. + + + If needed, more pseudoterminals can be added. However, + this requires patching the standard C library, the kernel, and + /etc/ttys. For example, + expands the number of pseudoterminals to 1152. + --------------020102060503000706000005-- From: John Baldwin To: Gabor PALI Cc: bug-followup@freebsd.org Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Wed, 23 Jul 2008 14:39:32 -0400 On Wednesday 23 July 2008 02:03:33 pm Gabor PALI wrote: > Here is a patch based on what we have discussed earlier. > A few wording suggestions: I would s/will probably run out/might run out/ since on newer snaps there are more pty's so this is less of an issue. Also, you can use the approach in the pty_1152.patch w/o too much trouble on any 5.x+ system. The patch is just slightly more cumbersome on 6.2 and older releases. Based on all that, I would actually reword much of this to go something like this: If you have a lot of telnet, ssh, X, or screen users, you might run out of pseudoterminals. By default, &os; 6.2 and earlier support 256 pseudoterminals, while &os; 6.3 and later support 512 pseudoterminals. I would then keep the that you have, but possibly mention that the patch will only apply cleanly to 6.3 or later. -- John Baldwin From: Gabor PALI To: John Baldwin Cc: bug-followup@freebsd.org Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Wed, 23 Jul 2008 21:29:33 +0200 This is a multi-part message in MIME format. --------------070406000604080700010300 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit John Baldwin wrote: > A few wording suggestions [..] I would then keep the that you > have, but possibly mention that the patch will only apply cleanly to > 6.3 or later. Here is the updated patch according to your request. --------------070406000604080700010300 Content-Type: text/plain; name="books.faq.ptys.patch.1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="books.faq.ptys.patch.1.diff" Index: book.sgml =================================================================== RCS file: /doc/en_US.ISO8859-1/books/faq/book.sgml,v retrieving revision 1.1075 diff -u -u -r1.1075 book.sgml --- book.sgml 19 Jul 2008 07:42:11 -0000 1.1075 +++ book.sgml 23 Jul 2008 19:21:56 -0000 @@ -6290,43 +6290,21 @@ - If you have lot of telnet, ssh, X, or screen users, - you will probably run out of pseudoterminals. Here is how to - add more: + If you have a lot of telnet, ssh, X, or screen users, + you might run out of pseudoterminals. By default, + &os; 6.2 and earlier support 256 pseudoterminals, while + &os; 6.3 and later support 512 pseudoterminals. - - - Build and install a new kernel with the line in - the configuration file: - - device pty N - - where N is the number - of requested pseudoterminals. - - - - Edit /etc/ttys and add lines - for each of the N terminals. They should match the form - of the existing entries, i.e. they look like this: - - ttyqc none network - - The order of the letter designations is - tty[pqrsPQRSlmnoLMNO][0123456789abcdefghijklmnopqrstuv], using a - regular expression. - - - - Reboot the system with the new kernel and you are - ready to go. - - - - - Using more than 256 (up to 512) &man.pty.4; devices requires - &os; 6.3 or later. - + + If needed, more pseudoterminals can be added. + However, this requires patching the standard C library, + the kernel, and /etc/ttys. For + example, + expands the number of pseudoterminals to 1152. Note that + the patch will only apply cleanly to &os; 6.3 or + later. + --------------070406000604080700010300-- From: Unga To: John Baldwin Cc: freebsd-gnats-submit@freebsd.org Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Wed, 23 Jul 2008 20:21:58 -0700 (PDT) --- On Mon, 7/21/08, John Baldwin wrote: > From: John Baldwin > Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 > To: freebsd-doc@freebsd.org > Cc: "Unga" , freebsd-gnats-submit@freebsd.org > Date: Monday, July 21, 2008, 11:21 PM > On Saturday 19 July 2008 11:25:47 am Unga wrote: > > > > >Number: 125772 > > >Category: docs > > >Synopsis: Increasing the number of ptys > based on the FAQ results > compilation error on FreeBSD 7.0 > > >Confidential: no > > >Severity: serious > > >Priority: low > > >Responsible: freebsd-doc > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: doc-bug > > >Submitter-Id: current-users > > >Arrival-Date: Sat Jul 19 15:30:00 UTC 2008 > > >Closed-Date: > > >Last-Modified: > > >Originator: Unga > > >Release: FreeBSD 7.0 > > >Organization: > > >Environment: > > >Description: > > As per FAQ, > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html, > > I tried to increase the number of ptys: > > "10.19.1 > > Build and install a new kernel with the line in the > > configuration file: > > device pty N > > where N is the number of requested > pseudoterminals." > > > > I tried to recompile the kernel. I have modified the > > GENERIC as follows: > > device pty 64 # Pseudo-ttys (telnet > etc) > > > > This results a compilation error: > > config: /usr/src/sys/i386/conf/GENERIC:268: syntax > error > > *** Error code 1 > > Yeah, that approach (number in config file) hasn't been > used since at least > 3.x. The default on 7.0 is 512 pty's (vs 256 in 6.x). > Do you need more than > that? > Hi Thanks for the reply. Its a shame on top the FAQ page shows "Frequently Asked Questions for FreeBSD 6.X and 7.X" and information is applicable for FreeBSD 3.x. My issue was when I run expect -c "spawn ls", I get "The system has no more ptys. Ask your system administrator to create more.". Later I identified its was pt_chown was missing in my system caused to display this misleading error message. The default on 7.0 is 512 pty's should be most probably enough. But I have proposal as follows: 1) Default number of pty's 512. 2) Give the option to increase to a new *hard limit* by recompiling the kernel as explained in the FAQ. 3) Give a sysctl option to soft increase the pty limit up to the *hard limit*. Thank you. Best regards Unga From: John Baldwin To: unga888@yahoo.com Cc: freebsd-gnats-submit@freebsd.org Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 Date: Thu, 24 Jul 2008 11:25:20 -0400 On Wednesday 23 July 2008 11:21:58 pm Unga wrote: > --- On Mon, 7/21/08, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: docs/125772: Increasing the number of ptys based on the FAQ results compilation error on FreeBSD 7.0 > > To: freebsd-doc@freebsd.org > > Cc: "Unga" , freebsd-gnats-submit@freebsd.org > > Date: Monday, July 21, 2008, 11:21 PM > > On Saturday 19 July 2008 11:25:47 am Unga wrote: > > > > > > >Number: 125772 > > > >Category: docs > > > >Synopsis: Increasing the number of ptys > > based on the FAQ results > > compilation error on FreeBSD 7.0 > > > >Confidential: no > > > >Severity: serious > > > >Priority: low > > > >Responsible: freebsd-doc > > > >State: open > > > >Quarter: > > > >Keywords: > > > >Date-Required: > > > >Class: doc-bug > > > >Submitter-Id: current-users > > > >Arrival-Date: Sat Jul 19 15:30:00 UTC 2008 > > > >Closed-Date: > > > >Last-Modified: > > > >Originator: Unga > > > >Release: FreeBSD 7.0 > > > >Organization: > > > >Environment: > > > >Description: > > > As per FAQ, > > > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html, > > > I tried to increase the number of ptys: > > > "10.19.1 > > > Build and install a new kernel with the line in the > > > configuration file: > > > device pty N > > > where N is the number of requested > > pseudoterminals." > > > > > > I tried to recompile the kernel. I have modified the > > > GENERIC as follows: > > > device pty 64 # Pseudo-ttys (telnet > > etc) > > > > > > This results a compilation error: > > > config: /usr/src/sys/i386/conf/GENERIC:268: syntax > > error > > > *** Error code 1 > > > > Yeah, that approach (number in config file) hasn't been > > used since at least > > 3.x. The default on 7.0 is 512 pty's (vs 256 in 6.x). > > Do you need more than > > that? > > > > Hi > > Thanks for the reply. Its a shame on top the FAQ page shows "Frequently Asked Questions for FreeBSD 6.X and 7.X" and information is applicable for FreeBSD 3.x. > > My issue was when I run expect -c "spawn ls", I get "The system has no more ptys. Ask your system administrator to create more.". Later I identified its was pt_chown was missing in my system caused to display this misleading error message. > > The default on 7.0 is 512 pty's should be most probably enough. But I have proposal as follows: > > 1) Default number of pty's 512. > > 2) Give the option to increase to a new *hard limit* by recompiling the kernel as explained in the FAQ. > > 3) Give a sysctl option to soft increase the pty limit up to the *hard limit*. > > Thank you. pgj@ is working on a patch to update the documentation. As far as changing the code, pgj's patch will explain how to update the hard limit. However, there currently isn't any sort of soft limit, and given that all the pty stuff is being rewritten in 8.x to be centered on pts(4), it is doubtful that there ever will be a soft limit via sysctl (except that pts(4) effectively only has a "soft" limit where the hard limit is the amount of RAM you have). -- John Baldwin From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: docs/125772: commit references a PR Date: Tue, 29 Jul 2008 18:11:40 +0000 (UTC) pgj 2008-07-29 18:11:32 UTC FreeBSD doc repository Modified files: en_US.ISO8859-1/books/faq book.sgml Log: Update Question 10.19.1: - Replace the old kernel configuration method with some info on the current limits and mention jhb's patch PR: docs/125772 Submitted by: Unga Discussed with: rwatson, jhb Reviewed by: jhb, gabor Approved by: gabor Revision Changes Path 1.1079 +15 -38 doc/en_US.ISO8859-1/books/faq/book.sgml _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" State-Changed-From-To: open->closed State-Changed-By: pgj State-Changed-When: Tue Jul 29 18:26:21 UTC 2008 State-Changed-Why: A patch was created and committed to solve your problem. Thank you for your submission! http://www.freebsd.org/cgi/query-pr.cgi?pr=125772 >Unformatted: