You will need to follow the steps below in order to increase
the number of STREAMS-based ptty devices.
In the following example, the number of ptty's to be configured
will be increased from 16 to 64.
1. Increase the number of master ptty devices by editing the file:
/etc/conf/sdevice.d/ptm
By default, this file contains :
ptm Y 16 0 0 0 0 0 0 0
Change the 3rd field ("unit") to the number of ptty devices
required. For example :
ptm Y 64 0 0 0 0 0 0 0
^^
2. Increase the corresponding value for the pseudo-terminal
emulation kernel module in the file:
/etc/conf/sdevice.d/ptem
By default, the file contains :
ptem Y 16 0 0 0 0 0 0 0
Change this to the following:
ptem Y 64 0 0 0 0 0 0 0
^^
3. Increase the corresponding value for the standard terminal line
discipline kernel module in the file:
/etc/conf/sdevice.d/ldterm
By default, the file contains:
ldterm Y 16 0 0 0 0 0 0 0
Change this to the following:
ldterm Y 64 0 0 0 0 0 0 0
^^
4. Create more slave devices by editing the file:
/etc/conf/node.d/pts
By default, this file contains:
pts pts000 c 0
pts pts001 c 1
pts pts002 c 2
pts pts003 c 3
pts pts004 c 4
pts pts005 c 5
pts pts006 c 6
pts pts007 c 7
pts pts008 c 8
pts pts009 c 9
pts pts010 c 10
pts pts011 c 11
pts pts012 c 12
pts pts013 c 13
pts pts014 c 14
pts pts015 c 15
Add more entries for slave devices to this file, incrementing
the numbers as necessary, such as:
pts pts016 c 16
pts pts017 c 17
....
....
pts pts063 c 62
pts pts064 c 63
5. If the desired number of ptty's will exceed the preconfigured
maximum of 32, then you must change the maximum number of units
allowed in mdevice(F).
Edit the file:
/etc/conf/cf.d/mdevice
Change the 8th field ("maxu") in the following entries in
this file to a number greater than the number of devices
required. By default, these entries are:
ptm - Scio ptm 0 42 1 32 -1
...
ldterm - Si ldtr 0 0 1 32 -1
...
ptem - Si ptem 0 0 1 32 -1
Change these entries to the following (assuming a new maximum
of 256):
ptm - Scio ptm 0 42 1 256 -1
...
ldterm - Si ldtr 0 0 1 256 -1
...
ptem - Si ptem 0 0 1 256 -1
^^^
6. Relink the UNIX kernel:
# cd /etc/conf/cf.d
# ./link_unix -y
7. Reboot the system for these changes to take effect.
NOTE:
If you see the following message when you relink the kernel:
LINE: ptem Y 64 0 0 0 0 0 0 0
ERROR: Unit, 64, must be within (1, 32)
FATAL ERROR: Errors encountered. Configuration terminated.
idbuild: idconfig had errors.
System build failed.
Then it is likely that one of the above configuration changes was not
correctly implemented.
SEE ALSO:
ptmx(M)
|