SUMMARY: setting sad_cnt when setting pt_cnt - Answerbook maybe wrong!

From: Surinder Dio (
Date: Tue Jul 18 2000 - 10:06:01 CDT


many thanks to the following for their instant replies:

Casper Dik, Viet Hoang , Kevin Buterbaug, Wilson, Matt , Stephen

According to Casper the definitive answer is in the FAQ - I reproduce
this below. I had gone with the answer book as I normally tend to use
this and had forgotten to check with the FAQ, anyhow it seems that the
Solaris 7 answerbook is incorrect in their mention of using
sad_cnt. But furthermore according to the FAQ, only the parameter pt_cnt
should be set thus:

set pt_cnt = <num> and then
boot -r

Viet Hoang and Matt Wilson also pointed me at the Solaris 2 FAQ. And
according to Stephen Harris there is a very good article by Adrian
Cockroft in the list archives - I havent found it yet - but I'll have
another go soon.

Kevin Buterbaug is following the Answerbook (with the addition of
using sadcnt instead of sad_cnt) and everything works fine on a ultra
5 with 1024 pseudo tty's. He doesnt set tune_t_flckrec.

I'm going with the FAQ and just setting pt_cnt to 150 as required for
my setup. Apparently this has all changed for Solaris 8 where the
pty's grow dynamically.

Many thanks for the replies.


Solaris 2 FAQ - Section 3.41

When setting pt_cnt DO NOT SET ANYTHING ELSE (don't set npty, don't set
sad_cnt or sadcnt, don't set nautopush)
The solaris FAQ says:
3.41) How can I have more than 48 pseudo-ttys?

    For Solaris 7 and before, edit /etc/system and add the following line:
        * System V pseudo terminals

        set pt_cnt = <num>

    Halt the system and boot -r.

    You can essentially have as many as you like, but you'll probably
    run into some other limit somewhere. More than 3000 are supported.
    Solaris 2.6 and earlier have telnet/rlogin daemons that do not
    support more than 3844 sessions each. That restriction is lifted
    in Solaris 7.
    Starting with Solaris 8, the number of pseudo terminals grows
    dynamically on demand. Setting the "pt_cnt" variable is no longer
    needed. The system still imposes internal limit based on available
    resources which is, usually, very high. In the rare case when this
    limit is still inadequate administrator may set pt_cnt variable to
    override it. If pt_cnt is set to anything less than the
    system-defined limit, its value is ignored.
    If administrators want to explicitly limit the maximum number of
    allocated ptys, they should set pt_max_pty variable which specifies
    the maximum number of ptys that can be created in the system. The
    default value 0 means that the maximum is automatically determined
    by the system based on the amount of memory.

    There is no need to reboot the system with -r flag after changing
    these variables. The changes start working immediately upon being
    set, even if they are set on the running system by adb or some
    other means.

    The pty driver creates entries in the /dev/pts directory as needed
    and these entries are never removed automatically, so they do not
    indicate the actual amount of ptys allocated by the system.

    Some die-hard system administrator myths as well as some Sun
    documentation claim that you have to increase "sad_cnt", "sadcnt"
    or "nautopush" when adding ptys. There is no truth in this.

    In the unlikely event that you run out of BSD-style ptys,
    you can increase them as well. The maximum here is currently
    176 for pty[p-z][0-9a-f]. This is somewhat less that the BSD
    maximum of 256 limited by 8 bit device minor numbers.
    BSD ttys are awkward to use and all programs I found support SYSV
    ptys without trouble.
        * You don't need this. Increasing this value too much usually
        * just wastes memory.
        * BSD applications never support more than 256 ptys.
        * Solaris 2.x supports no more than 176 BSD ptys.
        set npty = <num>
    But you're not there yet, you also need to edit /etc/iu.ap and
    substitute the new value of "npty-1" for the "47" on the following
    line, in case you do increase the number of BSD style ptys.
                ptsl 0 47 ldterm ttcompat
    Halt the system and boot -r.

Original Question:

I have a ultra 5 running solaris 7 (release 05/77) patched up the
latest cluster.

I needed to increase the number of pseudo-ttys and followed the advise
in the answerbook at
[Erm if that is too hairy even to cut and paste - just check Solaris 7
System Administrator Guide Volume II - Chapter 18 or search for
All I want to do is to configure 150 pseudo-ttys :-)
The answerbook advises to:
set pt_cnt = value
set ntpy = same_value_as_pt_cnt
set sad_cnt = 2_times_pt_cnt_ value
set nautopush=same_value_as_pt_cnt

I did this but upon reboot (including touch /reconfigure) I get the
following error message:
"Sorry variable 'sad_cnt' is not defined in the kernel"
So I then looked at:

Which is a great solaris resource IMHO.
which advises:

npty: set to pt_cnt
nautopush: set to twice value of pt_cnt
sadcnt: set to same value as pt_cnt
tune_t_flckrec: set to at least pt_cnt
There appear to be a number of discrepancies:

1. is the correct kernel parameter sad_cnt (as per answerbook) or
sadcnt as per the Princeton page, if it the former then why doesnt my
kernel like it. The only reason I pursued the Princeton pages was that
at least the parameter sadcnt it recommended was recognised by the
kernel, unlike the Answerbook parameter.

2. Answerbook says nautopush=same_value_as_pt_cnt whilst the Princeton
page says nautopush=twice_value_of_pt_cnt

3. Answerbook says sadcnt=2_value_of_pt_cnt whilst Princeton says
to set it to the same as pt_cnt

4. According to Answerbook the default value of tune_t_flcrec = 512,
so do I want to set it as low as pt_cnt as recommended on the
the Princeton page.

Some advise on the corrects parameters to set and to their values
would be gratefully received.

Many thanks

Surinder Singh Dio , School of Computing and Mathematical Sciences , University of Greenwich, London, England.

U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:12 CDT