out of pty devices


问题: out of pty devices:

[root@slave ~]# ls /dev/pt*/dev/ptmx

/dev/pts:0   1432 1868 2301 2737 3171 3606 4040 4476 4910 5345 5780 6214 665  7084 7519 79541   1433 1869 2302 2738 3172 3607 4041 4477 4911 5346 5781 6215 6650 7085 752  795510  1434 187  2303 2739 3173 3608 4042 4478 4912 5347 5782 6216 6651 7086 7520 7956100  1435 1870 2304 274  3174 3609 4043 4479 4913 5348 5783 6217 6652 7087 7521 79571000 1436 1814 5349 5784 6218 6653 7088 7522 7958......1416 1851 2286 2720 3155 3590 4024 446  4895 5329 5764 6199 6633 7068 7502 7938 9971417   5765 62  6634 7069 7503 7939 9981418 1853 2288 2722 3157 3592 4026 4461 4897 1419 1851 7070 7505 7940 ptmx

[root@slave ~]# ls /dev/pt*|wc -l
8221

[root@slave ~]# lsof /dev/ptmx |head COMMAND  PID USER  FD  TYPE DEVICE SIZE/OFF NODE NAME

sshd   19069 root   8u  CHR  5,2   0t0 1121 /dev/ptmx

sshd   19069 root  12u  CHR  5,2   0t0 1121 /dev/ptmx

sshd   19069 root  13u  CHR  5,2   0t0 1121 /dev/ptmx

python  24505 www   6u  CHR  5,2   0t0 1121 /dev/ptmx

python  24505 www   7u  CHR  5,2   0t0 1121 /dev/ptmx

python  24505 www   8u  CHR  5,2   0t0 1121 /dev/ptmx

python  24505 www   9u  CHR  5,2   0t0 1121 /dev/ptmx

[root@slave ~]# lecho “kernel.pty.max = 16384” >> /etc/sysctl.conf
[root@slave ~]# sysctl -p

备注: 这个参数默认是1024,不知道walle这边为啥不释放,一直在增加,如果不重启服务器,在线解决只能修改kernel.pty.max参数。

说明: /pty - pseudoterminal interfaces A pseudoterminal (sometimes abbreviated “pty”) is a pair of virtual character devices that provide a bidirectional communication channel. One end of the channel is called the master; the other end is called the slave. The slave end of the pseudoterminal provides an interface that behaves exactly like a classical terminal. A process that expects to be connected to a terminal, can open the slave end of a pseudoterminal and then be driven by a program that has opened the master end. Anything that is written on the master end is provided to the process on the slave end as though it was input typed on a terminal.

Pseudoterminals are used by**** applications such as network login services (ssh(1), rlogin(1), telnet(1)), terminal emulators such as xterm(1), script(1), screen(1), tmux(1), unbuffer(1), and expect(1).

后续: 目前只是临时解决,这个参数默认是1024,不知道walle这边为啥不释放,一直在增加,如果不重启服务器,在线解决只能修改kernel.pty.max参数。


文章作者: 云上的小雨滴
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 云上的小雨滴 !
评论
  目录