Help Getting Data

Steve Shah (sshah@cs.ucr.edu)
Thu, 24 Sep 1998 00:38:04 -0700


Hello All,

I need to collect some data on the average number of sockets
in use on various kinds of systems. I already have a few servers
setup, but I don't have enough active workstations. (It's still summer
vacation time on campus so the labs are quiet.) I would greatly
appreciate anyone willing to setup a cron job for me to collect
data. Below is the script. Ideally, I'd like to collect samples every
minute, but beggars can't be choosers. =) Set it up as often (or not
as often) as you're willing to. If you need help setting up a cronjob
to do this, let me know. 7 days of data would be great, but like
I said, I'll take anything. =)

Here is the script. Thanks for your help.
-Steve

#!/bin/sh

DATE=`date "+%x %X"`

LCTCP=`cat /proc/net/tcp | sed '1d' | wc -l | awk '{print $1}'`
LCUDP=`cat /proc/net/udp | sed '1d' | wc -l | awk '{print $1}'`

USERS=`who | wc -l | awk '{print $1}'`
PROCESS=`ps aux | wc -l | awk '{print $1}'`

echo "$DATE $USERS $PROCESS $LCTCP $LCUDP" >> socket_count.`uname -n`

-- 
______________________________________________________________________________
Steve Shah (sshah@cs.ucr.edu) | SysAdmin/Coder/Gabbernaut/DJ/Writer/Minister
http://www.cs.ucr.edu/~sshah  | We're not dropping out, we're infiltrating.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Beating code into submission, one operating system at a time...
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu