This gives me the users and the times they logged in & out, from those
files:
#!/bin/ksh
#
# whoweb.sh
#
# A script to check on who is using the Netview Web Client
# Invocation: whoweb.sh
# Can be called from the commandline, from cron, or the reports menu.
# Output: a report in the Reports directory, also stdout.
#
#set -x
#
# Definitions
FILE="/usr/OV/www/logs/*.request.log"
DIR=/usr/local/tivoli/scripts
RDIR=/usr/local/tivoli/reports
TDATA=tempwhoweb.data
TREPORT=tempwhoweb.report
REPORT=whoweb.report
# Intialization
typeset -R21 DTIME
typeset -L10 USER
cat /dev/null > $DIR/$TREPORT
echo "Web Client User Report as of `date`" > $RDIR/$REPORT
echo " " >> $RDIR/$REPORT
# Get the data
grep -E "MapServer/addClient|MapServer/removeClient" $FILE > $DIR/$TDATA
# Parse the data
for USER in `cat $DIR/$TDATA | cut -f3 -d" " | sort -u`
do
LASTREC=`grep $USER $DIR/$TDATA | tail -1`
FDATE=`echo $LASTREC | cut -f1 -d. | cut -f6 -d"/"`
DTIME=`echo $LASTREC | cut -f2 -d"[" | cut -f1 -d"]" | cut -f1 -d.`
ACT=`echo $LASTREC | cut -f2 -d"]" | cut -f4 -d"/" | cut -f1 -d"?" | cut
-f1 -d" "`
echo "$USER : $FDATE : $DTIME $ACT" >> $DIR/$TREPORT
done
sort +1 -t: $DIR/$TREPORT >> $RDIR/$REPORT
# Show the results, for use with Reports menu or commandline
cat $RDIR/$REPORT
# Cleanup
rm $DIR/$TDATA $DIR/$TREPORT
exit
Cordially,
Leslie A. Clark
IBM Global Services - Systems Mgmt & Networking
(248) 552-4968 Voicemail, Fax, Pager
Peter.Ingleson@ger
lingncm.com To: nv-l@lists.tivoli.com
cc:
10/25/2002 05:37 Subject: [nv-l] Web Client
User Logging
AM
Is there a log file other than /usr/OV/www/logs date_requests.log that
contains information about users accessing Tivoli via the webclient? I'm
looking for something which simply lists the user and time they logged in.
AIX 4.3.2 Netview 7.2.1
Regards
Peter Ingleson
Privileged/Confidential Information may be contained in this message. If
you
are not the addressee indicated in this message (or responsible for
delivery
of the message to such person), you may not copy or deliver this message to
anyone. In such a case, you should destroy this message and kindly notify
the sender by reply e-mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com
*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)
|