Le programme RDBSTAT permet la génération
d'un script SQL contenant les différentes statistiques.
Exemple :
$! Integration des statistiques courantes
$ rdbstat :== $ dev:[dir]rdbstat
$ define/user sys$output stat.sql
$ rdbstat mabase s
$ mc sql$
SQL> @stat.sql
SQL> exit
$! Consultation de statistiques
$ mc sql$
SQL> attach 'filename rds_database';
SQL> @ex1.sql
select
d.nodename
as node,
cast(collts
- cast(collsec as interval second) as timestamp(0)) as startcoll,
cast(s.collts
as timestamp(0)) as collts,
s.trans
as trans,
cast(s.transtimetot/s.trans/100
as integer(2)) as time,
cast(s.verbsuccess/s.trans
as integer(2)) as verb,
cast(s.dbssyread/s.trans
as integer(2)) as syncread
from
rdbstat
s, rdbdatabase d
where
s.dbid=d.dbid
and
d.dbname='MABASE'
and
s.collsec
> 15000
order by d.nodename, s.collts
limit to 2 rows
;
NODE
STARTCOLL
COLLTS
TRANS
TIME
VERB SYNCREAD
BISOU
1999-01-28 20:00:03 1999-01-29 20:00:03
536364
5.74 94.53
6.61
BISOU
1999-01-29 20:00:04 1999-01-30 20:00:02
142356
4.23 68.85
7.47
2 rows selected
SQL>