oracle数据库I/O测试脚本

oracle数据库I/O测试脚本

export ORACLE_SID=trustDB1
sqlplus -s "/ as sysdba" <<EOF
spool /home/oracle/iostat.log append
alter session set nls_date_format='DD/Mon/YYYY HH24:MI:SS';
select sysdate from dual;
SET SERVEROUTPUT ON
DECLARE
lat INTEGER;
iops INTEGER;
mbps INTEGER;
BEGIN
-- DBMS_RESOURCE_MANAGER.CALIBRATE_IO (, <max_latency>, iops, mbps, lat);
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (1, 100, iops, mbps, lat);

DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
DBMS_OUTPUT.PUT_LINE ('latency = ' || lat);
DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps);
end;
/
select sysdate from dual;
exit;
EOF

posted @ 2021-08-02 14:21  耀阳居士  阅读(158)  评论(0编辑  收藏  举报