Subject: Re: How to determine which Mac s are connected?
From: clyde jones (clydec@geocities.com)
Date: Thu Mar 23 2000 - 11:35:43 EST
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>Patrik Schindler, poc@pocnet.net writes:
>
>>Indeed, a little goodie to keep track which users were connected from
>>which machines would be nice, but I have no idea to keep track of
>>AppleTalk users.
>>
>>Only afpd knows which childs he forks. Perhaps this is one point: Register
>>some kind of file in /proc/sys (what about the /proc structure within
>>Solaris?)...
>
>We use "ps". Doing a 'ps aux|grep afp' will give you a list of all the
>afp processes. The one owned by "root" is the original. All the others
>are owned by the login id of the user. To track down machines, you have
>to go to the log file: /var/log/messages
>
> sudo grep afp /var/log/messages
>
>will list out everything, including the process ID. With a little
>scripting, it would be possible to "join" the two together by process ID,
>thus matching user with machine. Hmmmm....maybe I'll write it and donate
>it to the list.
>
Someone already did that - I have a nice little script that someone I
don't remember contributed-
Would the responsible party please stand up and be acknowledged.
just dump this into a file, and chmod a+x and it runs, you may have
to fiddle with the cut to make it nice for your own system.
#begin netatalk--cut here
echo
echo " NetATalk"
echo " --------"
ps axuw|grep atalkd|grep root|grep -v grep|sort|cut -c 1-15,41-160
ps axuw|grep afp |grep root|grep -v grep|sort|cut -c 1-15,41-160
ps axuw|grep papd |grep root|grep -v grep|sort|cut -c 1-15,41-160
echo " "
echo "Clients PID Status Start Binary"
echo "---------------------------------------------------------------------"
ps axuw|grep afp |grep -v root|grep -v grep|sort|cut -c 1-15,41-160
echo
echo "
- ---------------------------------------------------------------------"
#end -cut here
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
iQA/AwUBONpHvUP80ESqUED/EQKcdACfVW61vr/fE7FeBycB4lJ9r4l7iY4AoM4y
BD/2eD+OL7AWCQckflxDc/TL
=YZtL
-----END PGP SIGNATURE-----
--
Pray to God, But Hammer Away
- Spanish Proverb
Clyde Jones
Clyde Jones
http://www.geocities.com/clyde-jones -- mailto:clydec@geocities.com
Cell 443.226.6054
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 14:30:17 EST