## 查看数据库锁
dbaccess sysmaster - << EOF
select username,sid,waiter,dbsname,tabname,rowidlk,keynum,type
from sysmaster:syslocks a,sysmaster:syssessions b
where b.sid=a.owner and dbsname='lucifer';
EOF
## 查看表空间使用率
dbaccess sysmaster - << EOF
SELECT st.dbsname databasename, st.tabname,
MAX(dbinfo('UTC_TO_DATETIME',sin.ti_created)) createdtime,
SUM( sin.ti_nextns ) extents,
SUM( sin.ti_nrows ) nrows,
MAX( sin.ti_nkeys ) nkeys,
MAX( sin.ti_pagesize ) pagesize,
SUM( sin.ti_nptotal ) nptotal,
round(SUM( sin.ti_nptotal*sd.pagesize )/1024/1024,2)||'MB' total_size,
SUM( sin.ti_npused ) npused,
round(SUM( sin.ti_npused*sd.pagesize )/1024/1024,2)||'MB' used_size,
SUM( sin.ti_npdata ) npdata,
round(SUM( sin.ti_npdata*sd.pagesize )/1024/1024,2)||'MB' data_size
FROM