Search Text         
Search Tips?
Search By   And   Or   Boolean   Exact Match   TA #
Search In   Whole Doc   Keywords Sort By  
Product   Sub Product  

View Technical Articles (sorted by Product) New/Updated in the last:    7 days      14 days      30 days             
TA # Date Created Date Updated Resolved Issue?   Printer Friendly Version of This TA   Print Article
  E-mail This TA   E-mail Article
104829 09/21/1995 02:55 PM 04/27/2001 10:42 AM
Yes No
I get "No such device" (ENODEV) when opening /dev/ptmx more than 16 times
Keywords
/dev/ptmx /dev/pts streams pseudo-terminal ptty 16 open error 19 no such device enodev ptm ptem ldterm emulation terminal line discipline master slave clone clone unit maxu mdevice master tty 500 502 504 505 506 507 5.0.0 5.0.2 5.0.4 5.0.5 5.0.6
Release
SCO TCP/IP for SCO Unix Systems Release 1.2.1
SCO UNIX System V/386 Release 3.2 Operating System Version 4.2
SCO UNIX System V/386 Release 3.2 Development System Version 4.2
SCO OpenServer Enterprise System Release 5.0.0, 5.0.2, 5.0.4, 5.0.5, 5.0.6
SCO OpenServer Desktop System Release 5.0.0, 5.0.2, 5.0.4, 5.0.5, 5.0.6
SCO OpenServer Development System Release 5.0.0, 5.0.2, 5.0.4, 5.0.5, 5.0.6

Problem
          I am using STREAMS-based pseudo-terminals by opening the
          ptmx(M) device node. However, when I attempt to open this
          device for the 17th time, the open(S) routine returns the
          error code 19 ("No such device", ENODEV).

          How do I increase the number of STREAMS-based ptty's beyond
          the currently configured value of 16?


Solution
          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)

Related Articles
•  SCOadmin does not start; there are problems with Backup/Filesystem Managers.
•  Using virtual domains, error "... System file missing: Error 0" sending mail.
Back to Search ResultsBack to Search Results