Which process is eating ptys in my Linux server?
This appears to be a bug in Linux kernel1 - the counter is never decremented, even if ptys are deallocated.
In a standard2 setup, ls /dev/pts
should show the actual ptys allocated at the moment, and you can run lsof
on them to list all processes using a particular pty (or any other file, for that matter).
1 Fixed in Linux 3.2.
2 Single devpts instance.