Databases Reference
In-Depth Information
Execute the script in Listing 13-5. This script will display current I/O statistics for small I/O disk bandwidth per
second, large I/O disk bandwidth per second, small I/O requests per second, large I/O requests per second, small I/O
latency per second, and large I/O latency per second.
Listing 13-5. lst13-05-celldisk-iostats.sh
#!/bin/sh
# Name: lst13-06-celldisk-iostats.sh
# Purpose: Show current cell disk metrics
# Usage: ./lst13-06-celldisk-iostats.sh [metriccurrent|metrichistory]
SCOPE=$1 # run with either metriccurrent or metrichistory
# Adjust the following to suit your needs
CELLGROUP=/home/oracle/cell_group
MBMIN=125 ## 125 MB/second per disk
IORQMIN=120 ## 120 IOPs per disk
LATMIN=10000 ## 10 ms latency
########################################
## Metrics list per type #####################################################
MBPS="CD_IO_BY_R_LG_SEC CD_IO_BY_R_SM_SEC CD_IO_BY_W_LG_SEC CD_IO_BY_W_SM_SEC"
IORQ="CD_IO_RQ_R_LG_SEC CD_IO_RQ_R_SM_SEC CD_IO_RQ_W_LG_SEC CD_IO_RQ_W_SM_SEC"
LAT="CD_IO_TM_R_LG_RQ CD_IO_TM_R_SM_RQ CD_IO_TM_W_LG_RQ CD_IO_TM_W_SM_RQ"
##############################################################################
# dcli/cellcli commands
for met in $MBPS
do
echo "Listing ${SCOPE} for ${met} when IO rate > ${MBMIN} MB/second"
dcli -g ${CELLGROUP} "cellcli -e list ${SCOPE} \
where objectType=\'CELLDISK\' and name=\'${met}\' \
and metricValue \> ${MBMIN}"
done
for met in $IORQ
do
echo "Listing ${SCOPE} for ${met} when #requests > ${IORQMIN} IO requests/second"
dcli -g ${CELLGROUP} "cellcli -e list ${SCOPE} \
where objectType=\'CELLDISK\' and name=\'${met}\' \
and metricValue \> ${IORQMIN}"
done
for met in $LAT
do
echo "Listing ${SCOPE} for ${met} when IO latency > ${LATMIN} microseconds"
dcli -g ${CELLGROUP} "cellcli -e list ${SCOPE} \
where objectType=\'CELLDISK\' and name=\'${met}\' \
and metricValue \> ${LATMIN}"
done
[oracle@cm01dbm01 source]$ ./lst13-04-celldisk-iostats.sh metriccurrent
Listing metriccurrent for CD_IO_BY_R_LG_SEC when IO rate > 125 MB/second
... Additional output omitted for brevity
cm01cel02: CD_IO_RQ_R_LG_SEC CD_00_cm01cel02 152 IO/sec
... Additional output omitted for brevity
Listing metriccurrent for CD_IO_RQ_R_SM_SEC when #requests > 120 IO requests/second
Search WWH ::




Custom Search