Oracle Read STATSPACK Output
Oracle Read STATSPACK Output
Introduction
Getting Started
Next, you have two choices; you can either set up a cron
job to execute the two scripts during peak or scheduled
times; or launch the scripts interactively from within
svrmgrl. I'll discuss the interactive approach first,
followed by a couple of cron scenarios you can use.
select substr(name,1,30),value
from v$parameter
##################################################
##################################################
05 00,02,04,06,08,10,12,14,16,18,20,22 * * 1,2,3,4,5
/u01/oracle/scripts/utlbstat.sh sid
00 02,04,06,08,10,12,14,16,18,20,22 * * 1,2,3,4,5
/u01/oracle/scripts/utlestat.sh sid
15 06 * * * /bin/find /u01/oracle/admin/sid/reports -
mtime +17 -exec rm {} \;
##################################################
##################################################
#!/bin/sh
ORACLE_HOME=/u01/oracle/product/7.3.4;export ORACLE_HOME
connect internal
@$ORACLE_HOME/rdbms/admin/utlbstat
exit
##################################################
##################################################
#!/bin/sh
ORACLE_HOME=/u01/oracle/product/7.3.4;export ORACLE_HOME
cd /u01/oracle/admin/${ORACLE_SID}/reports
connect internal
@$ORACLE_HOME/rdbms/admin/utlestat
exit
mv report.txt report_$file.txt
##################################################
##################################################
15 06 * * * /bin/find /u01/oracle/admin/sid/reports -
mtime +17 -exec rm {} \;
##################################################
##################################################
05 06 * * 1 /u01/oracle/scripts/utlbstat.sh sid
00 18 * * 5 /u01/oracle/scripts/utlestat.sh sid
15 06 * * * /bin/find /u01/oracle/admin/sid/reports -
mtime +17 -exec rm {} \;
##################################################
##################################################
05 06 * * 4 /u01/oracle/scripts/utlbstat.sh sid
00 18 * * 4 /u01/oracle/scripts/utlestat.sh sid
15 06 * * * /bin/find /u01/oracle/admin/sid/reports -
mtime +17 -exec rm {} \;
Report.txt output
2> gets,
3>
round(decode(gethits,0,1,gethits)/decode(gets,0,1,gets),3
)
4> gethitratio,
5> pins,
6>
round(decode(pinhits,0,1,pinhits)/decode(pins,0,1,pins),3
)
7> pinhitratio,
CLUSTER 0 1 0 1
0 0
INDEX 0 1 0 1
0 0
OBJECT 0 1 0 1
0 0
PIPE 0 1 0 1
0 0
8 rows selected.
5> round(n1.change/(to_number(to_char(end_time,
'J'))*60*60*24 -
6> to_number(to_char(start_time,
'J'))*60*60*24 +
8> to_number(to_char(start_time,
'SSSSS')))
enqueue waits 41 0
0 .01
logons current -7 0
0 0
sorts (disk) 85 0
.01 .01 (17)
transaction rollbacks 40 0
0 .01
user rollbacks 54 0
.01 .01
not there are more dirty blocks in the buffer cache than
can be written to disk in a single I/O pass. Multiple
I/O's to write dirty blocks causes modified blocks to
wait in the queue to be written. Increasing the
DB_FILE_SIMULTANEOUS_WRITES parameter allows more than
one write to a data file at a given time. In general, you
should set this to the number of disks used in the stripe
set for optimal performance.
---------------------------
.00148068380670345941580293
1 row selected.
enqueue 44
4029 91.57
22 rows selected.
smon timer 69
679979 9854.77
enqueue 2
200 100
19 rows selected.
2> round((gets-misses)/decode(gets,0,1,gets),3)
3> hit_ratio,
4> sleeps,
5> round(sleeps/decode(misses,0,1,misses),3)
"SLEEPS/MISS"
archive control 2 0 1
0 0
enqueues 274500 37 1
2 .054
redo copy 12 12 0
5 .417
33 rows selected.
immed_gets nowait_gets,
immed_miss nowait_misses,
round(immed_gets/(immed_gets+immed_miss), 3)
nowait_hit_ratio
from stats$latches
order by name;
4> round((immed_gets/immed_gets+immed_miss), 3)
5> nowait_hit_ratio
7 rows selected.
7 rows selected.
undo header 13 2
undo block 1 0
3 rows selected.
always_anti_join NESTED_LOOPS
audit_trail DB
background_dump_dest
/u01/oracle/admin/sid/bdump
cache_size_threshold 9765
checkpoint_process TRUE
compatible 7.3.4.0
control_files
/onln/oradata/sid/control01.ctl, /u
core_dump_dest
/u01/oracle/admin/sid/cdump
cpu_count 8
db_block_buffers 97656
db_block_lru_latches 8
db_block_size 8192
dc_tablespaces 4347 25 0 0
40 44 42
dc_rollback_seg 2958 0 0 0
0 35 22
dc_tablespace_q 8 1 0 0
8 9 6
dc_users 75786 4 0 0
0 70 68
dc_users 14347 4 0 0
0 70 51
dc_user_grants 38206 4 0 0
0 63 62
dc_objects 283415 83 0 0
1 1904 1899
dc_tables 389821 52 0 0
2 1409 1404
dc_table_grants 149911 31 0 0
0 943 942
dc_constraint_d 0 0 13950 29
0 1 0
dc_synonyms 7270 7 0 0
0 120 118
dc_usernames 19145 5 0 0
0 72 63
dc_object_ids 4384554 31 0 0
0 1367 1366
dc_sequences 443 0 0 0
442 3 1
dc_tablespaces 636 0 0 0
636 10 9
dc_profiles 9700 0 0 0
0 4 2
dc_database_lin 14 0 0 0
0 7 2
dc_truncates 2 0 0 0
2 20 4
25 rows selected.
from v$rowcache;
---------------------------------------------------------
---------------------- ---------- ---------- ----------
AMAPP 21 21
135 2 2 1 67
ARAPP 29 29
103 0 0 0 67
---------------------------------------------------------
---------------------- ---------- ---------- ----------
AMAPP 21 29
57 0 0 0 67
ARAPP 13 13
37 0 0 0 67