监控ASM磁盘组IO吞吐量

监控ASM磁盘组IO吞吐量是管理ASM的基础功能,这篇文章讨论通过asmiostat.sh脚本和asmcmd iostat命令监控ASM磁盘组IO吞吐量,它类似于大部分Unix操作系统提供的iostat命令。

一.Oracle 11gR2 Database之前的版本参考如下文章使用asmiostat.sh脚本。

ASMIOSTAT Script to collect iostats for ASM disks (文档 ID 437996.1)
修改时间:2013-2-15类型:SCRIPT

In this Document

     
     
     
     
     
     
APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.3 to 11.1.0.7 [Release 10.1 to 11.1]
Information in this document applies to any platform.
***Checked for relevance on 27-Feb-2011***


PURPOSE

The OS command iostat is normally used to monitoring system input/output device load. This script will provide similar information like iostat  but specific for the ASM disks.
For details about iostat (ie cumulative or not, and so on) please refer to the man of iostat.

REQUIREMENTS

We use v$asm_disk_stat instead of v$asm_disk because the information is exactly the same.
The only difference is v$asm_disk_stat is the information available in memory while v$asm_disk access the disks to re-collect some information. Since the information required doesn't require to "re-collect" it from the disks, v$asm_disk_stat is more appropriate here.

On Solaris, please use :
- the /usr/wpg4/bin/grep utility instead of /usr/bin/grep to avoid the following error:
"grep: illegal option -- q"

- the /usr/wpg4/bin/awk utility instead of /usr/bin/awk to avoid the following error:
"awk: syntax error near line 48"

On other platforms, it could sometime fail due to Shell compatibility issues.

In such case, retry using another Shell  (ie: Bash instead of Ksh)

We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it. This script is provided as an example. If it doesn't work, you must adapt it by yourself for your platform 

In 10.1 asmcmd utility is not included:
asmcmd can be used against ASM versions 10gR1 (10.1.0.n) and 10gR2 (10.2.0.n). In ASM version 10.2 asmcmd is provided by default ASM installation.
To use asmcmd in ASM version 10.1 environment we can just copy relevant files from 10.2 installation into the 10.1

CONFIGURING

Not required.

INSTRUCTIONS

Not required

CAUTION

This sample code is provided for educational purposes only and not supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.

Proofread this sample code before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns), this sample code may not be in an executable state when you first receive it. Check over the sample code to ensure that errors of this type are corrected.

SAMPLE OUTPUT

For every ASM disk, this is the output provided: 

DiskPath    - Path to ASM disk 
DiskName    - ASM disk name 
Gr          - ASM disk group number 
Dsk        - ASM disk number 
Reads      - Reads 
Writes      - Writes 
AvRdTm      - Average read time (in msec) 
AvWrTm      - Average write time (in msec) 
KBRd        - Kilobytes read 
KBWr        - Kilobytes written 
AvRdSz      - Average read size (in bytes) 
AvWrSz      - Average write size (in bytes) 
RdEr        - Read errors 
WrEr        - Write errors


Script Output

 

DiskPath - DiskName            Gr Dsk Reads Writes AvRdTm AvWrTm KBRd KBWr AvRdSz AvWrSz RdEr WrEr 
/dev/asmdisk14 - DATA_0000 2    0      0          4            0.0            5.0            0        16          0            4096      0            0 
/dev/asmdisk4 - DATA_0001  2    1      10        0            17.0          0.0            0         0            0             0            0           0 
/dev/asmdisk17 - DATA_0002 2    2      0          1            0.0            0.0            0        0            0            512          0            0 
/dev/asmdisk5 - DATA_0003  2    3      0          0            0.0            0.0            0        0            0            0              0            0 
/dev/asmdisk16 - DATA_0004 2    4      3          3            6.7            3.3            0        0            0            0              0            0 
/dev/asmdisk23 - DATA_0005 2    5      0          0            0.0            0.0            0        0            0            0              0            0


The asmiostat.txt output file can be used for .csv and graphical representation by using Doc 1373682.1

Linux公社资源站下载asmiostat.zip工具。

------------------------------------------分割线------------------------------------------

免费下载地址在

用户名与密码都是

具体下载目录在 /2016年资料/4月/10日/监控ASM磁盘组IO吞吐量/

下载方法见

------------------------------------------分割线------------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fa43c1c178a6f401845a6faec9c064c4.html