Operating System - HP-UX
1753333 Members
5404 Online
108792 Solutions
New Discussion юеВ

Re: Running out of pts after telnet

 
SOLVED
Go to solution
H├еkon Svnedsen
New Member

Running out of pts after telnet

Hi.

We are running a HP-UX system and currently we have a problem with pts/t* not freeing up after a user telnet session. When the user connects I can se the number from (fuser /dev/pts/t* 2>&1 | grep [0-9]o | wc) incs by one. The problem is that when the user dissconnects this number is not dec by one.

The pts looks like this:

/dev/pts/tA: 13813o
/dev/pts/tB: 17487o
/dev/pts/tC: 21500o
/dev/pts/tD: 22470o 22474o 22332o
/dev/pts/tE: 22642o
/dev/pts/tF: 23146o
/dev/pts/tG: 27317o
/dev/pts/tH: 27608o
/dev/pts/tI: 28697o
/dev/pts/tJ: 29834o
/dev/pts/tK: 1780o
/dev/pts/tL: 2671o
/dev/pts/tM: 3989o
/dev/pts/tN: 4054o
/dev/pts/tO: 4931o 5123o 5118o
/dev/pts/tP: 5996o
/dev/pts/tQ: 12285o 26038o 26037o
/dev/pts/tR: 18544o 18445o 18548o
/dev/pts/tS: 21169o 21173o 21075o
/dev/pts/tT: 19650o 19851o 19855o
/dev/pts/tU: 21394o 21286o 21398o
/dev/pts/tV: 22358o 22428o 22433o
/dev/pts/tW: 25426o 25430o 25206o
/dev/pts/ta: 7724o
/dev/pts/tb: 5980o
/dev/pts/tc: 18121o
/dev/pts/td: 6320o
/dev/pts/te: 6273o
/dev/pts/tf: 6366o
/dev/pts/tg: 6539o
/dev/pts/th: 7151o
/dev/pts/ti: 7195o
/dev/pts/tj: 11156o
/dev/pts/tk: 18150o
/dev/pts/tl: 18282o
/dev/pts/tm: 18251o
/dev/pts/tn: 19499o
/dev/pts/to: 26107o
/dev/pts/tp: 27148o
/dev/pts/tq: 27132o
/dev/pts/tr: 9290o
/dev/pts/ts: 10290o
/dev/pts/tt: 10472o
/dev/pts/tu: 11029o
/dev/pts/tv: 11830o
/dev/pts/tw: 12236o
/dev/pts/tx: 13102o
/dev/pts/ty: 13497o
/dev/pts/tz: 13575o
root@pe-ux-02:/ # who
rfbm pts/tD Dec 22 06:51
rfrogerv pts/tO Dec 22 07:24
root pts/tQ Dec 22 07:35
rfbm pts/tR Dec 22 07:51
rfperhol pts/tS Dec 22 07:58
rfbm pts/tT Dec 22 07:55
rfrogerv pts/tU Dec 22 07:59
rfbjornt pts/tV Dec 22 08:02
rfrunel pts/tW Dec 22 08:06

The active pts have 3 colums, the innavtive ones have 1 column.

Regards,

Haakon.
11 REPLIES 11
Dennis Handly
Acclaimed Contributor

Re: Running out of pts after telnet

>The active pts have 3 columns, the inactive ones have 1 column.
>/dev/pts/tA: 13813o

What does this show?
ps -fp 13813 -p 17487

What HP-UX version are you using?
H├еkon Svnedsen
New Member

Re: Running out of pts after telnet

# ps -fp 13813 -p 17487
UID PID PPID C STIME TTY TIME COMMAND
rfperul 17487 1 0 06:35:47 ? 0:21 quick procloc=/opt/vpgroup/prod/phc owner=vpemgr auto=/opt/vpgroup/prod/phc/rf.qki
rfbm 13813 1 0 06:25:59 ? 0:28 quick procloc=/opt/vpgroup/prod/phc owner=vpemgr auto=/opt/vpgroup/prod/phc/rf.qki

The version is 11.23. This looks like the program the users are running. Can this be because of a dissconnect in the telnet session?
Dennis Handly
Acclaimed Contributor

Re: Running out of pts after telnet

>Can this be because of a disconnect in the telnet session?

Sure, especially if "quick" is ignoring SIGHUP and not exiting. Note both of them have init(1m) as their parent.
If there is a way to exit the "quick" application, they should be doing that. (Unless this is due to network problems?)

You might want to check the rest by:
UNIX95=EXTENDED_PS ps -f -C quick
H├еkon Svnedsen
New Member

Re: Running out of pts after telnet

Is there a easy way to free up theese pts? So we can buy us some time to troubleshoot the network?

For the moment we have to reboot the UX when the pts are exhausted.
Dennis Handly
Acclaimed Contributor

Re: Running out of pts after telnet

>Is there a easy way to free up these pts?

Sure, kill those "quick" processes that have have init(1m) for a parent. (I assumed this part was obvious. :-)
H├еkon Svnedsen
New Member

Re: Running out of pts after telnet

Can I do a single kill command for this or will that also take down the active connections? I'm not a skilled HP-UX man :)
Dennis Handly
Acclaimed Contributor

Re: Running out of pts after telnet

>Can I do a single kill command for this

Well with some fancy scripting, yes.
I assume this is for next time and now you can just do it manually?
Dennis Handly
Acclaimed Contributor

Re: Running out of pts after telnet

Something like:
# Sends SIGHUP to all "quick" process that have been orphaned.
echo kill -HUP \
$(UNIX95=EXTENDED_PS ps -C quick -opid= -oppid= | \
awk '$2 == 1 {print $1}')

Make sure this lists 13813 and 13575 but not 22470 and 25426.

If you are sure this is right, remove the "echo". If the -HUP doesn't kill these, then remove it and take the default.
H├еkon Svnedsen
New Member

Re: Running out of pts after telnet

Thanks a million! Kill without the HUP parameter did the trick. You have saved our Christmas :)