关于虚拟终端数目的修改问题
发表于:2007-06-09来源:作者:点击数:
标签:
前几天laoxia回复的帖子说在/etc/system里,有个pt_cnt是管这个,缺省为48,最大可以达到3844,一般调到3000就可以了,以上是控制TELNET和RLOGIN用户数的。 以前在使用2.6的时候,也遇到过这个问题,远程用户进不去系统,而且系统当时也特别慢,怀疑就是虚拟
前几天laoxia回复的帖子说在/etc/system里,有个pt_cnt是管这个,缺省为48,最大可以达到3844, 一般调到3000就可以了,以上是控制TELNET 和RLOGIN用户数的。
以前在使用2.6的时候,也遇到过这个问题,远程用户进不去系统,而且系统当时也特别慢,怀疑就是虚拟终端已经达到极限,修改了那个参数就可以登录了。现在工作站数量多了,就不存在很多用户同时登陆的问题了。
现在找到了关于Pseudo Terminals的详细资料,尤其是
soalris8和以前的方法不一样了。有兴趣的可以看一下
《Solaris Tunable Parameters Reference Manual》
下载地址
http://docs-pdf.sun.com/816-0607/816-0607.pdf
Pseudo Terminals
Pseudo terminals, ptys, are used for two purposes in Solaris:
Supporting remote logins by using the te
.net, rlogin, or rsh commands
Providing the interface through which the X Window system creates command
interpreter
windows
The default number of pseudo-terminals is sufficient for a desktop workstation so
tuning focuses on the number of ptys available for remote logins.
Previous versions of Solaris required that steps be taken to explicitly configure the
system for the desired number of ptys. Starting with the Solaris 8 release, a new
mechanism removes the necessity for tuning in most cases. The default number of
ptys is now based on the amount of memory on the system and should be changed
only to increase the number or to decrease the default value.
Three related variables are used in the configuration process:
pt_cnt - Default maximum number of ptys
pt_pctofmem - Percentage of kernel memory that can be dedicated to pty
support structures
pt_max_pty - Hard maximum for number of ptys
pt_cnt has a default value of zero, which tells the system to limit logins based on the
amount of memory specified in pct_pctofmem, unless pt_max_pty is set. If pt_cnt
is non-zero, ptys are allocated until this limit. When that threshold is crossed, the
system looks at pt_max_pty. If that has a non-zero value, it is compared to pt_cnt
and the pty allocation is allowed if pt_cnt is less than pt_max_pty. If pt_max_pty
is zero, pt_cnt is compared to the number of ptys supported based on
pt_pctofmem. If pt_cnt is less than this value, the pty allocation is allowed. Note
that the limit based on pt_pctofmem only comes into play if both pt_cnt and
ptms_ptymax have their default values of zero.
To put a hard limit on ptys that is different than the maximum derived from
pt_pctofmem, set pt_cnt and ptms_ptymax in /etc/system to the number of
ptys desired. The setting of ptms_pctofmem is not relev
ant in this case.
To dedicate a different percentage of system memory to pty support and let the
operating system manage the explicit limits, do the following:
Do not set pt_cnt or ptms_ptymax in /etc/system.
Set pt_pctofmem in /etc/system to the desired percentage. For example, set
pt_pctofmem=10 for a 10% setting.
Note that the memory is not actually allocated until it is used in support of a pty.
Once memory is allocated, it remains allocated.
pt_cnt
Description The number of /dev/pts entries available is dynamic up to a
limit determined by the amount of physical memory available
on the system. pt_cnt is one of three variables that
determines the minimum number of logins that the system can
accommodate. The default maximum number of /dev/pts
devices the system can support is determined at boot time by
computing the number of pty structures that can fit in a
percentage of system memory (see pt_pctofmem next). If
pt_cnt is zero, the system allocates up to that maximum. If
pt_cnt is non-zero, the system allocates to the greater of
pt_cnt and the default maximum.
Data Type Unsigned integer
Default 0
Range 0 to maxpid
Units logins/windows
Dynamic? No
Validation None
When to Change When you want to explicitly control the number of users that
can remotely log in to the system.
Commitment Level Unstable
Change History See “pt_cnt (Solaris 7 and Earlier Releases)” on page 147 for
more information.
pt_pctofmem
Description Maximum percentage of physical memory that can be
consumed by data structures to support /dev/pts entries. A
system running a 64-bit kernel consumes 176 bytes per
/dev/pts entry. A system running a 32-bit kernel consumes
112 bytes per /dev/pts entry.
Data Type Unsigned integer
Default 5
Range 0 to 100
Units Percentage
Dynamic? No
Validation None
When to Change When you want to either restrict or increase the number of
users that can login to the system. A value of zero means that
no remote users can log in to the system.
Commitment Level Unstable
pt_max_pty
Description Maximum number of ptys the system offers.
Data Type Unsigned integer
Default 0 (Uses system defined maximum)
Range 0 to MAXUINT
Units logins/windows
Dynamic? Yes
Validation None
Implicit Should be greater than or equal to pt_cnt.Value is not
checked until the number of ptys allocated exceeds the value
of pt_cnt.
When to Change When you want to place an absolute ceiling on the number of
logins supported even if the system could handle more based
on its current configuration values.
Commitment Level Unstable
x3y4z5 回复于:2003-06-19 08:39:01
|
号文章,有用!
|
iricyan 回复于:2003-06-19 08:40:00
|
啊呀,E文 啊
回头看
|
llc107 回复于:2003-06-19 08:42:47
|
race的这本书很有用哦! :)
|
laoxia 回复于:2003-06-19 09:21:20
|
so good!
|
重阳 回复于:2003-06-19 10:46:49
|
还是有用的。 不错!
|
原文转自:http://www.ltesting.net