What is PTY?
A pseudo-terminal (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 pseudo-terminal 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 pseudo-terminal 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.
Check maximum number of PTY
Login as root and type the following command
[root@lifelinux ~]# cat /proc/sys/kernel/pty/max
Increase the maximum number of PTY temporarily
If you need to increase the PTYs to allow more sessions temporarily. Type the following command
[root@lifelinux ~]# echo 5000 > /proc/sys/kernel/pty/max
The setting is changed instantly but this setting will be erased after the reboot.
Increase the maximum number of PTY permanently
Edit kernel configuration file at /etc/sysctl.conf, enter
[root@lifelinux ~]# vi /etc/sysctl.conf
Add or edit following config directive
kernel.pty.max = 5000
To enable the changes made in sysctl.conf you will need to run the command
[root@lifelinux ~]# sysctl -p
- How To Install Lighttpd And PHP (PHP-FPM) On CentOS 6
- How To Install Nginx And PHP-FPM On CentOS 6 Via Yum
- How To Install Nginx And PHP (PHP-FPM) On CentOS 6
- How To Display Failed Login Attempt ?
- Linux Display CPU Information
- How To Enable IP Forwarding On CentOS / RedHat
- How To Increase PHP Memory Limit
- MySQL Slow Query Log File
- How to disable ICMP echo responses in Linux
- How To Install Rootkit Hunter