[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference abbott::mailworks-unix

Title:Mailworks-unix
Notice:V2.0.4 now available -- see Note 4.375
Moderator:TAMARA::NEUMAN::Neumann
Created:Wed Jun 02 1993
Last Modified:Tue Jun 03 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1384
Total number of notes:5851

1368.0. "Support/Analysis Script" by TAMARA::OSM4S::Neumann (Stan Neumann) Fri Apr 18 1997 16:08

in order to help us better analyze problems on customers systems
that are having problems, we have written a script that will
collect information about the system, then write it to a file
(called session.out), which can then be mailed to the engineers.
We will use the information in that script to help us
identify the problems on the user's system.
Starting with version 2, a copy of this script is installed
on the user's system in /usr/opt/DMW/unsupported/suppscr.sh,
and a copy of that script is below.  (The version below
collects more data that the version in V2.0 and V2.0 ECO2.)

If a customer is having problems, the first step is to get the
customer to run this script, as close to the time of the problem
as possible.  If that is not possible, the customer should run
this script at the busiest time of the day on their system (usually
early afternoon) - this allows us to see how the system is working
when it is being heavily loaded.

-Stan


#!/usr/bin/csh
#
# Copyright (c) Digital Equipment Corporation, 1992-1997
# 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: suppscr.sh

set top = `pwd`
set vardir = "/var/opt/DMW"
set logdir = $vardir/logs

set usrdir = /usr/opt/DMW
set hdrstr = "\n\n%%%**********************"
set hdrend = "*************************\n\n"


if ( -f /tmp/sprt.tmp1 ) then
	rm /tmp/sprt.tmp*
endif
cd $top

/usr/bin/echo "Now capturing information about the MailWorks environment"
/usr/bin/echo "This script may take 1 to 2 minutes to complete\n"
/usr/bin/echo "This script assumes read acces to the system and mailworks logs"
/usr/bin/echo "If any files have access denied, then run the script as root \n"
# suppscr.sh  script for parsing system to get snapshot of all processes
#		that are running and latest data from server logs
#		the system paramaters for paging, network etc....

# There is a switch statement used to allow any further additions that
#		would need a different script path.
#		     

#set type = $<
set type="OSF"

switch ($type)

case	"OSF":

if ( -f session.out ) then
	rm session.out
endif

echo  "OS version data" >> session.out
#uname -a >> session.out
uname -a | awk ' {print "OS name:  " $1  "   Level " $3 "    Version " $4;} ' >> session.out
uname -a | awk ' {print "Node Name: " $2 "    Hardware: " $5;}' >> session.out
/usr/bin/echo "Today's date: " >> session.out
date >> session.out

echo -n "Mailworks version level: " >> session.out
$usrdir/bin/mailworks -version >> session.out

/usr/bin/echo "$hdrstr process status $hdrend" >> session.out
ps auxw |grep mss >> /tmp/sprt.tmp1
ps auxw |grep msr >> /tmp/sprt.tmp1
ps auxw |grep mcs >> /tmp/sprt.tmp1
ps auxw |grep grecv >> /tmp/sprt.tmp1
ps auxw |grep gsend >> /tmp/sprt.tmp1
ps auxw |grep lsfd >> /tmp/sprt.tmp1
ps auxw |grep deferd >> /tmp/sprt.tmp1
ps auxw |grep pop3 >> /tmp/sprt.tmp1
ps auxw |grep ibxd >> /tmp/sprt.tmp1
ps auxw |grep mta >> /tmp/sprt.tmp1
ps auxw |grep dsad >> /tmp/sprt.tmp1
sed -e '/grep/d' /tmp/sprt.tmp1 > /tmp/sprt.tmp2
cat /tmp/sprt.tmp2 >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr top CPU process status $hdrend" >> session.out
ps auxw | head >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr Number of connections $hdrend" >> session.out
set clnt = `netstat -n |grep 6161 | wc -l`
echo " Connections to mcs/FCS (port 6161):  $clnt " >> session.out
set clnt = `netstat -n |grep 5889 | wc -l`
echo " Connections to mss (port 5889):  $clnt " >> session.out

/usr/bin/echo "$hdrstr Approx # accounts $hdrend" >>session.out
wc -l /var/opt/DMW/dndatafile >>session.out

/usr/bin/echo "$hdrstr Disk space $hdrend" >>session.out
df >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr uptime $hdrend" >> session.out
uptime >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr I/O statistics $hdrend" >> session.out
iostat >> session.out
/usr/bin/echo "\n" >> session.out

echo -n "Page Size:  " >> session.out
pagesize >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr System configuration $hdrend" >> session.out
/sbin/sysconfig -q vm  >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr Kernel configuration $hdrend" >> session.out
hostname | sed -e 's/\..*//' | awk ' { st = toupper($1); print st; } ' > /tmp/sprt.tmp3 
set hn = `cat /tmp/sprt.tmp3`
cat  /sys/conf/$hn >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr memory and page info $hdrend" >> session.out
vmstat -s >> session.out
/usr/bin/echo "$hdrstr vmstat 1 10 $hdrend" >> session.out
vmstat 1 10 >> session.out

/usr/bin/echo "$hdrstr Network Information $hdrend" >> session.out
netstat -s >> session.out
echo >> session.out
/usr/bin/echo "$hdrstr Network routing Info $hdrend" >> session.out
netstat -r >> session.out
/usr/bin/echo "$hdrstr Network memory data $hdrend" >> session.out
netstat -m >> session.out
echo >> session.out

/usr/bin/echo "$hdrstr Swap space $hdrend" >> session.out
swapon -s >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr Swap File $hdrend" >> session.out
ls -l /sbin/*swap* >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr Users Logged On $hdrend" >> session.out
who -a >> session.out
/usr/bin/echo "\n" >> session.out

/usr/bin/echo "$hdrstr Sytem Event Reporter $hdrend" >> session.out
uerf -R -O ptf >> session.out
/usr/bin/echo "\n\n" >> session.out
uerf -R -O pag >> session.out
/usr/bin/echo "\n\n" >> session.out
uerf -R -O | head -n100 >> session.out
/usr/bin/echo "\n\n" >> session.out
uerf -R -r 101 >> session.out
/usr/bin/echo "\n\n" >> session.out
uerf -R -r 302 >> session.out
/usr/bin/echo "\n\n" >> session.out
uerf -R -r 300 | head -n100 >> session.out

/usr/bin/echo "$hdrstr Selected Installed Components  $hdrend" >> session.out
setld -i | grep -Ei 'dna|mta|dxd|ibx' >> session.out

/usr/bin/echo "$hdrstr dump the end of each log file $hdrend" >> session.out
/usr/bin/echo "$hdrstr MSS LOG $hdrend"  >> session.out
ls -l $vardir/logs/msslog | awk '{print "***** MSSLOG SIZE: " $5; print " ";} ' >> session.out
tail -50 $vardir/logs/msslog >> session.out
/usr/bin/echo "$hdrstr MSR LOG $hdrend "  >> session.out
ls -l $vardir/logs/msrlog | awk '{print "***** MSRLOG SIZE: " $5; print " ";} ' >> session.out
tail -50 $vardir/logs/msrlog >> session.out
/usr/bin/echo "$hdrstr MCS LOG $hdrend "  >> session.out
ls -l $vardir/logs/mcslog | awk '{print "***** MCSLOG SIZE: " $5; print " ";} ' >> session.out
tail -50 $vardir/logs/mcslog >> session.out
/usr/bin/echo "$hdrstr MAILWORKS LOG $hdrend "  >> session.out
ls -l $vardir/logs/mailworkslog | awk '{print "***** MAILWORKSLOG SIZE: " $5; print " ";} ' >> 
session.out
tail -50 $vardir/logs/mailworkslog >> session.out
/usr/bin/echo "$hdrstr INETGRECV LOG $hdrend "  >> session.out
ls -l $vardir/logs/inetgrecvlog | awk '{print "***** INETGRECVLOG SIZE: " $5; print " ";} ' >> 
session.out
tail -50 $vardir/logs/inetgrecvlog >> session.out
/usr/bin/echo "$hdrstr X488 LOG $hdrend "  >> session.out
ls -l $vardir/logs/x488glog | awk '{print "***** X488GLOG SIZE: " $5; print " ";} ' >> 
session.out
tail -50 $vardir/logs/x488glog >> session.out
/usr/bin/echo "$hdrstr POP3 LOG $hdrend "  >> session.out
ls -l $vardir/logs/pop3log | awk '{print "***** POP3LOG SIZE: " $5; print " ";} ' >> 
session.out
tail -50 $vardir/logs/pop3log >> session.out

/usr/bin/echo "$hdrstr MAILWORKSRC FILE $hdrend "  >> session.out
ls -l $usrdir/MAILworksrc | awk '{print "***** MAILWORKSRC SIZE: " $5; print " ";} ' >> 
session.out
cat $usrdir/MAILworksrc >> session.out

/usr/bin/echo "$hdrstr Environment Variable $hdrend" >> session.out
printenv >> session.out

breaksw
endsw
/usr/bin/echo "\nSuccessfully captured MailWorks environment information"
/usr/bin/echo "   in the file session.out."
/usr/bin/echo "\nPlease include this file when reporting a problem." 

T.RTitleUserPersonal
Name
DateLines