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 (
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