Sysmaster table / field that stores "pages used"?
Posted in 2003
Topics: Stored Procedures & SPL, Server Administration
Hi all,
When I run an "oncheck -pt dbasename:tablename", Some of the output relates to
pages used and allocated. If a table is fragmented, a series of values will be
displayed for each individual fragment.
I'm particularly interested in the "Number of pages used" value that is
output. In the interests of table maintenance I'd like to be able to capture
and sum totals for this particular value.
The value that oncheck displays would have to be stored in one of the
sysmaster tables wouldn't it? Does anybody know which actual table and field
it would be please?
Thanks for your time.
Paul.
Hi,
it's sysmaster:systabinfo .
Probably you want to join this with some other tables to get
a more meaningful output.
You can use (or take clues from) a shell script that a colleague
once put together [ unfortunately it's a little bit German ... :-) ]:
#!/usr/bin/sh
if test $# -eq 0
then
echo "Bitte Datenbankname als Aufrufparameter angeben !"
exit 0
fi
db=$1;
dbaccess $db - «!
unload to "/tmp/tabdbs.out" delimiter ":"
select s1.owner,
s1.tabname,
DBINFO('DBSPACE', s1.partnum),
s2.ti_nextns,
s2.ti_nptotal,
s2.ti_npused,
s3.strategy,
s3.exprtext,
round ((100 - ((s2.ti_npused * 100) / s2.ti_nptotal)),0)
from sysmaster:systabnames s1,
sysmaster:systabinfo s2,
outer $db:sysfragments s3
where s1.dbsname = "$db"
and s1.partnum = s2.ti_partnum
and s1.partnum = s3.partn
order by 2;!
awk -v DB=$db 'BEGIN { FS=":";
print " Owner Table Name IN> DBSpace #extents #pages
#pused %free";
print "======== ================== ================== ======== ======
====== =====";}
{
printf ("%-8s:%-18s> %-18s = m m =\\
",$1,$2,$3,$4,$5,$6,$9);
if ( $7 == "E" ) print ">> fragm: ", $8;
if ( $7 == "R" ) print ">> fragm: ROUND ROBIN";
sum4=sum4 + $4; sum5=sum5 + $5; sum6=sum6 + $6; sum9=sum9 + $9; }
END { sum9=sum9 / NR;
printf ("\\
** SUMMEN ** %d Tabellen %d %d
%d %d \\
",NR,sum4,sum5,sum6,sum9);
print "=========================== ======== ======
====== =====\\
";
}' /tmp/tabdbs.out |more;
rm /tmp/tabdbs.out
exit
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich
Data Management Solutions
"PAUL VERHEYEN" <paul.verheyen@ahmg.com.au>
Sent by: forum.subscriber@iiug.org
11.12.2003 04:17
To: ids@iiug.org
cc:
Subject: Sysmaster table / field that stores "pages used"? [2339]
Hi all,
When I run an "oncheck -pt dbasename:tablename", Some of the output
relates to pages used and allocated. If a table is fragmented, a series of
values will be displayed for each individual fragment.
I'm particularly interested in the "Number of pages used" value that is
output. In the interests of table maintenance I'd like to be able to
capture and sum totals for this particular value.
The value that oncheck displays would have to be stored in one of the
sysmaster tables wouldn't it? Does anybody know which actual table and
field it would be please?
Thanks for your time.
Paul.
All this
information is stored in table sysmaster:sysptnhdr.
Regards,
Víctor Fabián Miramontes
DBA Proyecto SAP
Cencosud S.A.
TE: 064-11-4733-1000 int. 4172
>>> "PAUL VERHEYEN" <paul.verheyen@ahmg.com.au> 12/11 12:17 AM >>>
Hi all,
When I run an "oncheck -pt dbasename:tablename", Some of the output
relates to pages used and allocated. If a table is fragmented, a series
of values will be displayed for each individual fragment.
I'm particularly interested in the "Number of pages used" value that is
output. In the interests of table maintenance I'd like to be able to
capture and sum totals for this particular value.
The value that oncheck displays would have to be stored in one of the
sysmaster tables wouldn't it? Does anybody know which actual table and
field it would be please?
Thanks for your time.
Paul.