Subject: Re: [netatalk-admins] not quite 'top' but
From: Gregor Retti (c60831@germ2.uibk.ac.at)
Date: Sun Oct 26 1997 - 02:47:57 EST
hi,
thanks for the script! I had to add a w to the ps parameters, since on my
linux-box I have netatalk installed in /usr/local/atalk and afpd shows as
/usr/local/atalk/etc/afpd in the ps output, which will be truncated
otherwise.
gregor
At 16:08 Uhr +0200 25.10.1997, John Ostrowick wrote:
>the following is a script i made to show who was logged in.
>
>it's pretty cool.
>
>
>
>#! /bin/sh
>
>if [ $# -gt 0 ]
>then
> echo "USER PID %CPU %MEM SIZE RSS TTY STAT START TIME
>COMMAND"
> ps -axu | grep afpd | grep $1 | grep -v "grep afpd"
>else
> echo "USER PID %CPU %MEM SIZE RSS TTY STAT START TIME
>COMMAND"
> echo
> ps -axu | grep afpd | grep -v "grep afpd"
> echo
> echo 'total number of users logged on:'
> ps -axl | grep afpd | grep -v "grep afpd" | wc --lines
> echo
> echo 'main afpd status'
> afpdstat=`ps -axu | grep root | grep afpd | grep -v "grep afpd"`
> if [ "$afpdstat" != "" ]
> then
> echo 'up'
> else
> echo 'DOWN'
> fi
> echo
> echo 'atalkd status'
> atalkdstat=`ps -ax | grep atalkd | grep -v "grep atalkd"`
> if [ "$atalkdstat" != "" ]
> then
> echo 'up'
> else
> echo 'DOWN'
> fi
>fi
>exit 0
>
>________________________________________________________________
>John Ostrowick jon@cs.wits.ac.za
>Computer Science Department, University of the Witwatersrand
>1 Jan Smuts Ave, Johannesburg, South Africa. Senate House 1012
>Phone: +27 11 716-3783 Fax: +27 11 339-3513
>My web page: http://macaroni.cs.wits.ac.za/more/jon/aboutme.html
>My ftp site: ftp://macaroni.cs.wits.ac.za
>My listserv: http://macaroni.cs.wits.ac.za/listservs.html
-----------------------------------------------------------------------
gregor retti ----------- http://germanistik.uibk.ac.at/germ/retti.html
-----------------------------------------------------------------------
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:27:45 EST