General
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Need Script? Track Glance - Process for Oracle

 
SOLVED
Go to solution
Regular Advisor

Need Script? Track Glance - Process for Oracle

Hi All,

My boss would like a way for me to capture
some statistic's using Glance. He wants
to see what Oracle PID's are hogging the
time and then our DBA and research it from
an Oracle side.

We have glance and top and I do not know how
to use measureware. And right now I don't
want to learn.

I need to run this script randomly over
a day or two, and especially during our
busy time 3-5pm.

I understand I can put this in cron if I
get a script. Now if there is a way for
me to use measureware and understand it
fast and easily I am open.

I just have some bad memories of me trying ot
learn measureware from manuals.

I think we have measureware on this server:

B3693AA C.03.25.00 HP GlancePlus/UX for s800 11i
B3701AA C.03.25.00 HP GlancePlus/UX Pak for s800 11i

Any clues on how to do this without me just
doing random print screens?

Laurie
Happiness is a choice
9 REPLIES 9
Acclaimed Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi Laurie:

OK, one thing you can do is run 'glance' in its "adviser_only" mode.

The '-adviser_only' option allows glance to run without displays to the terminal. the adivser output can be redirected from stdout to a file to capture key events.

Regards!

...JRF...
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

You could call a glance script from cron. The following format is simple and puts some data to a flat file. You can grep stuff out as you need. You'll probably have to tweek it to meet your needs.

/opt/perf/bin/glance -t -iterations 2 -f /tmp/glance.out

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi Laurie,

You need to configure the applications in Measureware to collect the data.

It's easy.

Edit /var/opt/perf/parm file and add the entries as illustrated by other examples in the file. You will be grouping the users and the processes together as applications. For ex., to collect the data for "oracle users" you would keep the following configuration.

application=Oracle Users
file=oracle(instance)

applicaton=oracle background
file=ora_*

Restart the measureware by mwa stop and mwa start.

Let the database be collected for a couple of days.

Then you can extract the stats anytime using the extract command. For all the available metrics look at /var/opt/perf/reptall file.

-Sri



You may be disappointed if you fail, but you are doomed if you don't try
Regular Advisor

Re: Need Script? Track Glance - Process for Oracle

OK I need a little more help to use Measureware.

I edited the two files and now how do I excute
the report stuff?

Measureware is running but I'm not sure
if the reporting stuff is working.

What about sar? Is there a way to put
sar in cron to run every hour to report
on all the process id, user names and give
% of CPU used...

I'm not so sure screen printing is where it's
at for upper management..they like cool
looking reports...

Thank,
Laurie
Happiness is a choice
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi,
Use extract command for report. You can later import this in to spread sheet than produce graph.

Here is the syntex
run it from /car/opt/perf
extract -xp -g -l /var/opt/perf/datafiles/logglob -r reptall -b "today -7" -f perf1.txt (output file name)

today -7 will give you the details for last 7 days.


Goodluck,

-USA..
Good Luck..
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi,

You can also use sar to produce data and then generate report

create this file in /usr/lbin/sa with execute permissions

#! /usr/bin/sh
# sa1.sh

DATE=`date +%d`
ENDIR=/usr/lbin/sa
DFILE=/var/adm/sa/sa$DATE
cd $ENDIR
if [ $# = 0 ]
then
exec $ENDIR/sadc 1 1 $DFILE
else
exec $ENDIR/sadc $* $DFILE
fi

add this script in your cron job
20,40 * * * 1-5 /usr/lbin/sa/sa1

This will generate file in /var/adm/sa

Also have a look at sarcheck.com for a reporting tool

-Goodluck,
-USA..

Good Luck..
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi,

The sadc execute file is here
Permissions should be like this

-r-xr-xr-x 1 bin bin 20480 Nov 7 1997 sadc

Good Luck..
Honored Contributor
Solution

Re: Need Script? Track Glance - Process for Oracle

Hi Laurie,

You will get cool reports with measure. Try to play around with extract command. Once you configure the Applications as I mentioned earlier, you can get the stats on the Processes of the applications using the extract command.

Using extract, you can get the reports into ascii files that can be exported into Excel to draw nice colorful graphs for the management.

Just a little bit of reading is required on Measure and how to use extract if you have measureware running.

Below is the step by step process

1. Check if measureware is running
/opt/perf/bin/mwa status
You should see scope/ux daemon running
2. Run extract
/opt/perf/bin/extract
->Guide (enter command:)
->Y (...continue?..)
->export (..function do you want)
-> (..../logglob)
->Y (..template file?)
-> (...continue)
->Y (... editor now?)
This will place a file called myrept in the current directory and open a vi session. Edit this file and take out the * before the metrics
You will get a lot of help in the file itself
save..
->myrept (file name...)
->detail (..do you want to export)
->Y (...see a date format?)
-> (..start?)
format and default will be give above the prompt
-> (..stop?)
format and default will be given above the
prompt
->y (..export the data now?)
->
->
->q

This will generate a file called xfrd*.asc. copy it to your PC and import into EXCEL. You can draw nice graphs for the metrics that you commented out in myrept file. Look at all the metrics and pick up important ones.

-Sri





-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Honored Contributor

Re: Need Script? Track Glance - Process for Oracle

Hi,

Attached is a very simple report file that you
change if you wish to collect further information.
In the report file, (called reptest2) I'm only collecting application CPU information. It is very simple.

The following command will extract from the
mwa database the CPU information if it collected.
Sridhar has provided the information that you need in your /var/opt/perf/parm file. Of course
let it collect for a couple of days first

To extract the data and place into a 'wk1' file
run the following command.

/opt/perf/bin/extract -A -r /var/opt/perf/reptest2 -xm 0201 -xp

okay, you are nor ready to transfer the file
onto an excel spreadsheet and then into graphs.

HTH
-Michael
Anyone for a Mutiny ?