| #!/bin/csh
#
# Copyright (c) Digital Equipment Corporation, 1992, 1993, 1994, 1995
# All Rights Reserved. Unpublished rights reserved
# under the copyright laws of the United States.
#
# The software contained on this media is proprietary
# to and embodies the confidential technology of
# Digital Equipment Corporation. Possession, use,
# duplication or dissemination of the software and
# media is authorized only pursuant to a valid written
# license from Digital Equipment Corporation.
#
# RESTRICTED RIGHTS LEGEND Use, duplication, or
# disclosure by the U.S. Government is subject to
# restrictions as set forth in Subparagraph (c)(1)(ii)
# of DFARS 252.227-7013, or in FAR 52.227-19, as
# applicable.
#
# Script: usage_mcs.sh
set top = `pwd`
set opt = "/var/opt/DMW"
set run_tr = 1
set run_sh = $run_tr
#usage_mcs.sh - script for tracking system usage for users connected to mcs
# server by a client. Check results of Virtual Memory size
# and number of users for any increases.
# Continue to check after waiting for ~ 30 min.
if( -f mcsrun.log) then
rm mcsrun.log
endif
echo "Host: " `uname -n` " Date: " `date ` >> mcsrun.log
echo "" >> mcsrun.log
while ( "$run_sh" == "$run_tr" )
set psmc = `ps auxw | grep -e "bin/mcs" | grep -v "grep" `
echo $psmc | awk ' {print "ps: mcs - VSZ: " $5 " RSS: " $6; } '\
>> mcsrun.log
set psms = `ps auxw | grep -e "bin/mss" | grep -v "grep" `
echo $psms | awk ' {print "ps: mss - VSZ: " $5 " RSS: " $6; } '\
>> mcsrun.log
echo "" >> mcsrun.log
set clnt = `netstat -n |grep 6161 | wc -l`
echo " Number of Clients: $clnt " " Time: " `date +"%r"` >> mcsrun.log
echo "" >> mcsrun.log
vmstat >> mcsrun.log
set sl = 1
while ( $sl < 31 )
sleep 60
@ sl++
end
/usr/bin/echo "\n*********************************\n" >> mcsrun.log
end
|