Subject: Re: Newbie: please help (Out of ptys in i386 system)
To: David Maxwell <>
From: None <>
List: netbsd-users
Date: 04/23/2003 23:48:22

Thanx for your replies, but the kern.maxptys shows the default value of 992
# sysctl kern.maxptys
kern.maxptys = 992
and the total no. of ttys and ptys are much more as clearly visible by the command below:
# cd /dev
# ls tty[pqrstuvwxyzPQRST]* | wc -l
# ls pty* |wc -l

But still after 62 telnet sessions I get the error "telnetd: All network ports in use" and when I try to do a rlogin I get the error "rlogind: out of
Any idea why is this happening ?
I also have tried putting the entries of tty's in the /etc/ttys file, but that also has been of no help, any clues on how can i get rid of this
problem ?

Thanx in Advance

- Rajan

David Maxwell <> on 23/04/2003 21:34:50

Sent by:

To:    Wojciech Puchar <>
cc:    Rajan Bhasin/HSS@HSS,

Subject:    Re: Newbie: please help (Out of ptys in i386 system)

On Wed, Apr 23, 2003 at 02:43:05PM +0200, Wojciech Puchar wrote:
> > Hi,
> >
> > I have recently installed Netbsd Release 1.6 on one of the Intel
> > can you please let me know how can we increase the number of ptys so
> > users can log in remotely. The default number of ptys that the system
> > supporting in 64, whats the way out to increase this number. Any help
> > sort out this problem would be appreciated.
> please read documentation about compiling your own kernel (at
> www page go to Documentation and FAQs)

That has not been neccessary for a while.

sysctl kern.maxptys

will tell you how many ptys your kernel will permit. It can be changed

sysctl -w kern.maxptys=[newnumber]

The limit you're likely hittin is the number of /dev/tty* entries
created by default. Go to /dev and type
ls tty[pqrstuvwxyzPQRST]* | wc -l

To find out how many you have now.

Then to make more,

./MAKEDEV pty0 pty1 ...  (up to 15 if you want)

Each one gives you (2*26)+10 ptys.

David Maxwell,| --> Mastery of UNIX, like
mastery of language, offers real freedom. The price of freedom is always
but there's no substitute. Personally, I'd rather pay for my freedom than
 in a bitmapped, pop-up-happy dungeon like NT. - Thomas Scoville