[geeks] hrm, possible?
geeks at sunhelp.org
geeks at sunhelp.org
Mon Jul 2 04:47:46 CDT 2001
On Fri, Jun 29, 2001 at 11:50:02AM -0500, Bill Bradford wrote:
> bash-2.02# ps -fe |grep ovw |grep display
> mbarnes 20452 1 0 11:05:34 ? 0:09 /opt/OV/bin/ovw -rw -display 172.17.8.151:0
> dtrujill 20078 1 0 09:33:27 ? 0:17 /opt/OV/bin/ovw -ro -display 172.17.11.241:0
> lwilliam 20473 1 0 11:10:53 ? 0:10 /opt/OV/bin/ovw -ro -display 172.17.9.166:0
> ojanuari 20432 1 0 11:00:44 ? 0:10 /opt/OV/bin/ovw -ro -display 172.17.11.135:0
> dher405 20049 1 0 09:29:07 ? 0:11 /opt/OV/bin/ovw/ -ro -display 172.17.11.136:0
> jwells 20139 1 0 09:47:17 ? 0:19 /opt/OV/bin/ovw -ro -display 172.17.8.206:0
> mbarnes 20029 1 45 09:28:10 ? 11:31 /opt/OV/bin/ovw -rw -display 172.17.8.151:0
> kfuk855 20368 1 0 10:45:05 ? 0:08 /opt/OV/bin/ovw -rw -display 172.17.10.135:0
> proman 20509 1 1 11:31:38 ? 0:09 /opt/OV/bin/ovw -ro -display 172.17.11.64:0
>
> Anybody know if it would be possible to write a script (in whatever
> language necessary) that would detect the duplicate sessions (note
> processes 20432 and 20368, pointing to the same IP address)? I'm
> working on some way to detect when one of our lusers forgets to
> kill his session before the next shift starts....
#!/usr/bin/sh
POO=`ps -fe | grep ovw | grep display | awk '{print $NF}' | uniq -d`
if [ -z "$POO" ]
then
echo "Nothing to worry about Bill. I dunno, get some coffee?"
else
for i in `echo $POO`
do
echo "AAAAARRRRGH. Potential ovw duplicate session at $POO."
done
echo "Note to Bill: Destroy Luser(s)."
fi
Brian.
--
Brian Scanlan, Systems Administrator.
Irish Times New Media - http://www.ireland.com
More information about the geeks
mailing list