SUMMARY: Q: How to find out who/what is using ptys

From: Tom Crummey (tom@eleceng.ucl.ac.uk)
Date: Fri Apr 24 1998 - 08:25:39 CDT


Hello,

The best answer seems to be to use fuser /dev/pts/* which gives a list of
processes using each pts device. These then can be looked up in a ps -efl
listing.

Similar to this is to use lsof (available from
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof ) which I guess gives the
same information (I haven't got and build lsof yet).

ps -efl gives a partial list of pts's used, but it's not as complete as the
above method.

listing all the pts files using ls -l /devices/pseudo | grep pt gives a list
of all pt devices and who was lat using them. It does not show which are
currently used and which are free.

Thanks to :

Seela Balkissoon <seela@cs.yorku.ca>
Burak Baysal <bbaysal@siue.edu>
"David Evans" <DJEVANS@au.oracle.com>
Dennis Martens <MARTENSD@health.qld.gov.au>
"Carsten B. Knudsen" <cbk@terma.dk>

For anyone who needs to increase the number of ptys, I refer them to the
Soalris 2 FAQ for this list, but essentially it says put the following in
/etc/system and boot -r:

* System V pseudo terminals 80 of them

        set pt_cnt = 80
 For BSD style pttys there is another line:
 
 set npty = 80
 
 The FAQ says you probably don't need to do this as you should never run out
 of BSD style ptys.
 
 Tom.

----------------------------------------------------------------------------
 Tom Crummey, EMAIL: tom@eleceng.ucl.ac.uk
 University College London,
 Department of Electronic and Electrical Engineering,
 Torrington Place, TEL: +44 (0)171 419 3898
 London, FAX: +44 (0)171 388 9307
 WC1E 7JE, U.K. MOBILE: +44 (0)370 264 543
----------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:39 CDT