This what I am going to suggest below can be put in a script but due to lack of time, I am not going to be able to do that, but the method is pretty simple
1. find the telnet connections you are interested from the output of the follwoing command
netstat -a | grep telnet
tcp 0 0 *.telnet *.* LISTEN
tcp 0 2 crt00.telnet mel01.52763 ESTABLISHED
here mel01 is my workstation and crt00 is the serviceguard package name I telnet into. It may also be an IP address
then use lsof to find the PID of the person's telnet session:
lsof -i tcp | grep 52763
(52763 port comes from the output of netstat command above)
output will look something like this
telnetd 7863 root 0u inet 0x5c8cd7c0 0t0 TCP crt00:telnet->mel01:52763 (ESTABLISHED)
and you may see multiple instances of the same line. The PID of interest to you is 7863
Hope this helps.
by the way, if you do not have lsof installed, you can get it from
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.77/
________________________________
UNIX because I majored in cryptology...