about a week ago, I asked ...
> Is there a command/way to find out how many pty's are currently being used
> and how many are available for both SunOS and Solaris ??
> I already know how to increase the number of pty's.
Thanks for the following who responded,
To find out the max number of pty's that can be used:
# adb -k /dev/ksyms /dev/mem
In SunOS 4.x
# adb -k /vmunix /dev/mem
( Thanks to firstname.lastname@example.org )
To find out how many are being used:
You can grep the output of lsof (lsof_3.29_W.tar.gz -- I think I got it from
ra$ lsof | (line; grep '20,') | more
COMMAND PID USER FD TYPE DEVICE SIZE/OFF INODE NAME
ncdwm 1519 ejk 0u VCHR 20, 4 0x92 511 /dev/ttyp4
ncdwm 1519 ejk 1u VCHR 20, 4 0x92 511 /dev/ttyp4
ncdwm 1519 ejk 2u VCHR 20, 4 0x92 511 /dev/ttyp4
ncdwm 2588 beb 0u VCHR 20, 0 0x10279 503 /dev/ttyp0
ncdwm 2588 beb 1u VCHR 20, 0 0x10279 503 /dev/ttyp0
ncdwm 2588 beb 2u VCHR 20, 0 0x10279 503 /dev/ttyp0
rsh 3417 csd 1u VCHR 20, 31 0xdc2b5 565 /dev/ttyqf
rsh 3417 csd 2u VCHR 20, 31 0xdc2b5 565 /dev/ttyqf
rsh 3418 csd 1u VCHR 20, 31 0xdc2b5 565 /dev/ttyqf
rsh 3418 csd 2u VCHR 20, 31 0xdc2b5 565 /dev/ttyqf
rsh 6022 csd 1u VCHR 20, 32 0x8dd3 567 /dev/ttyr0
rsh 6022 csd 2u VCHR 20, 32 0x8dd3 567 /dev/ttyr0
rsh 6140 csd 1u VCHR 20, 2 0x9a9ef 507 /dev/ttyp2
rsh 6140 csd 2u VCHR 20, 2 0x9a9ef 507 /dev/ttyp2
20 just happens to be the major device number of the pty driver on this
system, as determined by examining the unfiltered output. Note that a given
pty will often be open two or three times, so you have to cut on minor
device number or name and do a sort -u on the result.
( Thanks to email@example.com )
and also thanks to firstname.lastname@example.org who gave me some the following info
on finding out how to look up kernel symbols:
Also to look at more kernel symbols, use 'nm':
#nm /vmunix >/etc/vmunix.nm
this will have a complete list of all symbols that adb can look up for you.
also /usr/include/param.c has comments after these symbols so you could
use it as a refenrence. Sun also just released PANIC! a long awaited
adb manual. Well worth the money, and probably on of the best books ever
written for kernel debbugging and hacking. Also SPARC tuning and performance
is a must to have for any serious sysadmin work.
Thanks to all once again !!
_ /| Dave Haut
\,o.O' Sys Admin
=(___)= EXAR Corporation
(408) 434-6400 x3462
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:30 CDT