Networker

Re: [Networker] Monitoring with Cricket

2005-07-18 11:17:31
Subject: Re: [Networker] Monitoring with Cricket
From: Will Parsons <w.parsons AT LEEDS.AC DOT UK>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 18 Jul 2005 16:12:59 +0100
Hi Phil,
Fairly Solaris specific I'm afraid, but runs continueously on my server. The per-group logging is handy for seeing how your group parallelism pans out during the night. ( I prefer not to stay up all night watching process listings ;-)

HTH.
Will

Does anyone have a script that gets the number of total sessions used on the
networker server so I can feed it into cricket?


#!/bin/ksh -a
#
# ps -ef |grep savegrp


while true
do

# initialise the counter for each sleep loop
let tot_num=0

for gpid in `pgrep savegrp`
do
GRPNAME=`ps -ef |grep [Ss]avegrp |egrep -e " ${gpid} "|awk '{print $NF}'`
# echo ${GRPNAME}

CHILDREN=`ps -ef |grep '[Nn]srexec ' |grep ${gpid} |wc -l|awk '{print $1}'`
# echo ${CHILDREN}
DT=`date`
# echo "${DT}\t${CHILDREN}\t${GRPNAME}"
echo "${DT}\t${CHILDREN}\t${GRPNAME}" >> /var/log/savegrpcount.$$.${GRPNAME}
let tot_num=${tot_num}+${CHILDREN}
done

echo "`date` : ${tot_num}" >> /var/log/savegrpcount.TOTAL.log

sleep 600
done
# Fin





--


w.parsons AT leeds.ac DOT uk
UNIX Support
Information Systems Services
The University of Leeds
+44 113 343 5670

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listserv.temple DOT edu or visit the list's Web site at
http://listserv.temple.edu/archives/networker.html where you can
also view and post messages to the list. Questions regarding this list
should be sent to stan AT temple DOT edu
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

<Prev in Thread] Current Thread [Next in Thread>