All pastes #759154 Raw Edit

max cap script

public text v1 · immutable
·published 2007-11-02 21:55 UTC
rendered paste body
#!/usr/bin/ksh

# debuggin'
set -x


MAILLIST="james.mchargue@alltel.com"

if [ $1 ] ; then
        searchdate=$1
else
        searchdate=`date '+%Y%m%d'`
fi


# results=`/ldaphome/e0119990/xgrep.ksh "fgrep '$searchdate'" /WebSphereAdapters/connectors/JText/ErrJText/out/ERR_LOG_${searchdate}
 | cut -d [ -f 6 | cut -d : -f 2,3,4 | sort | uniq -c`

# working
# bufferDrained=`/ldaphome/e0119990/xgrep.ksh "fgrep '$searchdate'" /WebSphereAdapters/connectors/JText/ErrJText/out/ERR_LOG_${searc
hdate} | fgrep 'ErrorCounter: ,' | cut -d [ -f 6 | cut -d : -f 2,3,4 | sort | uniq -c`

# mine
# ====
bufferDrained=`/ldaphome/e0119990/xgrep.ksh "fgrep '$searchdate'" /logs/InterchangeSystem.log | fgrep 'buffer is now drained' | cut
-d [ -f 7 | cut -d : -f 2 | cut -d . -f 1 | sort | uniq -c`


mail -t $MAILLIST << EOF
Subject:$searchdate wbip01X - collab max event capacity report
This email contains the number of times any given collab reached
it's maximum event capacity, drained it's buffer and went to a blocked state
on $searchdate.

Please do not reply to this email.

Count   Information message
$bufferDrained

EOF