Original question:
>
> I want to increase the number pseudo terminals. The manual says I have
> to add a line in /etc/system setting variables: npty (for 4.x) and
> pt_cnt (for 5.x), and then reboot.
>
> Before I do that I'd like to know:
>
> 1- What is 4.x and 5.x and which are the differences? I have no idea
> what it means? Is this related to the OS version? I found this on the
> System Administration Guide, Volume II, for Solaris 2.5.1, chapter 73.
>
> 2 - How do I check current value of these parameters? Documentation
> says it is 48 by default, but how can I get it from the system?
>
> 3- Is there any performance consideration to do before increasing the
> number? Which is a reasonable value?
The answers I got:
1- 4.x and 5.x do refer to the OS version. So 4.x goes for Solaris 1.x
type and 5.x goes for Solaris 2.x type.
It means the type of pseudoterminal.
4.x = /dev/tty BSD compatible pseudo terminals.
Only used for compatibility with certain
applications that live in the BSD world)
5.x = /dev/pts System V style pseudo terminals.
So pt_cnt is the one I have to increase by adding the
corresponding line in the /etc/system: pt_cnt = X
and then boot -r.
2- ls /dev/pts* and count them :-(( or better
ls -1 /dev/pts* | wc -l
echo pt_cnt/X | adb -k /dev/ksyms /dev/mem
Here you will get it in hexadecimal form. You have to
convert it to a decimal base.
adb -k (You get a promp, then type: )
pt_cnt/D (The /D is to get it in decimal format)
npty/D
$q (To quit)
3- You can increase the pts safely, and it will take only
a small amount of the kernel memory. 128 or 256 are
reasonable numbers to start with. Or you can calculate it
from users * terminals_per_user.
The limit is around 3000.
Many people also answered that they have increased this
number and are happily going with it. The only consideration
is that you can have more users running more stuff each.
However, BSD styles ttys are limited because they need to
hardcode all the posible device names and the limit is 256.
Special Thanks to:
Erik Janssen <ejanssen@nl.oracle.com>
Tomas Felner <Tomas.Felner@ubs.ch>
Andre Lachapelle <Andre.Lachapelle@eng.canadair.ca>
Casper Dik <casper@holland.Sun.COM>
Birger A. Wathne <birger@Vest.Sdata.No>
David Lee <T.D.Lee@durham.ac.uk>
Mike Blandford <mikey@nmsu.edu>
Stefan Puscasu <stfp@roipb.cs.pub.ro>
Martin D. Baldenegro <mdb@dosmanos.cwiz.com>
Deepak D Wilson <Deepak_D_Wilson@notes.seagate.com>
Cheryl L. Southard <cld@astro.caltech.edu>
John DiMarco <jdd@cs.toronto.edu>
Mark A. Baldwin <baldma@aur.alcatel.com
Richard Skelton <rich@brake.demon.co.uk
Chris Marble <cmarble@orion.ac.hmc.edu>
Glenn Satchell <Glenn.Satchell@uniq.com.au>