In an AIX system (AIX p740 1 7) that is running for about several months, some pts aren't reused anymore.This was noticed using the who command, with the following awk expression, running it daily for weeks:who | awk '{ printf %s %s\n, $2, $1 }' | awk -F'/' '{ printf %s\n, $2 }' | sort -n | awk 'BEGIN{port=$1} {if (port+0 != $1) {printf --- FREE PTS: %s - %s\n, port, $1-1}; printf pts/%s (%s)\n, $1, $2; port=$1+1 }'  A typical output, always shows the pts/14 as free, and all others ports, like 0, 1, 2, and so on, became free at night, and are allocated again in the next day, except the port 14 (I cannot examine more ports that can have the same behavior of pts/14, because there are about 600 ports being using daily, and the analysis stopped at the port 14).pts/0 (foo)pts/1 (foo)pts/2 (foo)pts/3 (foo)pts/4 (user12)pts/5 (bar)pts/6 (user12)pts/7 (foo)pts/8 (user13)pts/9 (foo)pts/10 (foo)pts/11 (foo)pts/12 (bar)pts/13 (foo)--- FREE PTS: 14 - 14pts/15 (foo)pts/16 (foo)pts/17 (user13)pts/18 (user13)There are ways to get the reason for this? And release this port ?
Why are some pts in AIX never reused?
ssh;terminal;aix;telnet;pty
who only shows logins.  For example, tmux / screen opens a pty but I think it doesn't count as a login.  I think you can find the process (pid) with fuser /dev/pts/14.(I would use lsof on Linux, but fuser should be available on any posix system).