Consultor Eletrônico



Kbase P16007: Script to gather promon statistics in batch mode for a database running on UNIX.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/07/2003
Status: Verified

GOAL:

Script to gather promon statistics in batch mode for a database running on UNIX.

GOAL:

How to monitor a database in batch mode using promon.

FACT(s) (Environment):

UNIX

FIX:

#Following is a script that allows you to gather some promon statistics, together with some sar statistics while promon is running.

# syntax: gather <dbname> <mon.out> <sar.out>
#
# where
# <dbname> is the name of the database
# <mon.out> is the name of the file to capture the promon output
# <sar.out> is the name of the file to capture the sar outputt
#
# gather reads the file gather.answers for input to promon

echo "gather statistics on database" $1 "into output file" $2
echo "sar data into" $3
echo "enter y to continue"
read ans
case $ans in
y) echo "this takes about 1 minute..."
sar -ucmd 5 10 > $3 &
promon $1 > $2 < gather.answers;;
*) echo "aborted"; exit 1;;
esac
# *** END of gather script ***
The gather.answers file can containg just about any input that will drive promon to the options you want. Following is a sample gather.answers file. Please note that the comments do not belong to the file. # Begin of gather.answers # gather.answers # These answers could change depending on what version of progress # progress you are running. # include everything below this line: # Following is an explanation of the options chosen in the example:
#
# Begin of gather.answers
# gather.answers
# These answers could change depending on what version of progress
# progress you are running.
# include everything below this line:
# Following is an explanation of the options chosen in the example:
#
m
1
9999
q
1
1
q
R&D
5
1
9999
6
5
p
1
4
3
p
2
t
2
1
a
p
5
a
p
13
a
p
7
a
t
3
2
p
4
t
3
2
t
debghb
6
8
s
p
9
s
x
#
*** END of gather.answers ***