The number of allocated ptys (/proc/sys/kernel/pty/nr) on my linux server is constantly growing, and exceeds the number of active logins, terminals and screen sessions by orders of magnitude. Only a system restart resets seems to reset it.
How can I find out which process is eating up the pty's?
I tried the suggestion in answer 1, but
# lsof -n | grep pts | wc -l 137 # cat /proc/sys/kernel/pty/nr 696 # uname -a Linux spitzer 2.6.32-34-server #77-Ubuntu SMP Tue Sep 13 20:54:38 UTC 2011 x86_64 GNU/Linux