#!/bin/sh # # This is a shell archive. To extract its contents, # execute this file with /bin/sh to create the file(s): # # seqscan.sh seqscan_README # # This shell archive created: Tue Apr 16 15:54:06 EDT 2002 # echo "Extracting file seqscan_README" sed -e 's/^X//' <<\SHAR_EOF > seqscan_README XHi, X XI made shell script for monitor sequential scan, this use "onstat -g Xppf". (TBLSPACE_STAT 1) X XThanks X XVagner Pontes X XSeqScan Table TblSpace nrows npused X13642 mimo_opcao 0x0030000b 93 2 X5678 premio_mimo 0x003000f4 30 1 X2814 sysusers 0x003000c6 4542 96 X1001 movtoarq 0x00302ab3 10 18 X621 promocoes_brindes 0x00300d46 77 4 X XYoshitec Informática XRua Luis Coelho, 308 6º andar conj. 63/64 XCep 01309-000 •Cerqueira César •São Paulo - S.P. XFone: 255-7601 XE-mail vagner@yoshitec.com.br Xhttp:www.yoshitec.com.br X SHAR_EOF if [ `wc -c < seqscan_README` -ne 671 ] then echo "Lengths do not match -- Bad Copy of seqscan_README" fi echo "Extracting file seqscan.sh" sed -e 's/^X//' <<\SHAR_EOF > seqscan.sh XMAXROW=5 XDB=mimo X Xif [ -n "$1" ] X then X if [ "$1" = "-i" ] X then X echo "Gerando Catalogo" X X echo " output to partnum.txt without headings \ X select tabname, lower(hex(partnum)), nrows , npused \ X from systables where partnum>0 \ X union all \ X select tabname, lower(hex(b.partn)), b.nrows, b.npused \ X from systables a, sysfragments b \ X where b.tabid = a.tabid and partnum=0 " | dbaccess $DB 2> /dev/null X fi X Xfi X X Xmonta() X{ X while read linha X do X PARTN=` echo $linha | awk ' { print substr($1,3,6) } ' `; X SEQSC=` echo $linha | awk ' { print $2 } ' `; X X linha2=` grep $PARTN /users/dba/SCRIPTS/partnum.txt ` X echo "$SEQSC $linha2 " X X done X X X} X Xonstat -g ppf | tail +5 | awk -v MAXR=$MAXROW ' { if( $12 > MAXR ) print $1, $12 } ' | sort -n -r -k2| monta | awk 'BEGIN { printf "%-10s" "%-20s" "%-15s" "%-10s" "%-10s\n", "SeqScan","Table","TblSpace","nrows","npused" } X { printf "%-10s" "%-20s" "%-15s" "%-10s" "%-10s\n", $1,$2,$3,$4,$5 } ' SHAR_EOF if [ `wc -c < seqscan.sh` -ne 1176 ] then echo "Lengths do not match -- Bad Copy of seqscan.sh" fi echo "Done." exit 0