当前位置:  数据库>oracle

监控ASM磁盘组IO吞吐量

    来源: 互联网  发布时间:2017-06-22

    本文导语: 监控ASM磁盘组IO吞吐量是管理ASM的基础功能,这篇文章讨论通过asmiostat.sh脚本和asmcmd iostat命令监控ASM磁盘组IO吞吐量,它类似于大部分Unix操作系统提供的iostat命令。一.Oracle 11gR2 Database之前的版本参考如下文章使用asmiostat.sh脚本...

监控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监控ASM磁盘组IO吞吐量[图片]类型:SCRIPT

In this Document

  Purpose   Requirements   Configuring   Instructions   Script   Sample Output

 

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工具。:

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

免费下载地址在 http://linux.linuxidc.com/

用户名与密码都是www.linuxidc.com

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

下载方法见

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



二.11gR2使用asmcmd工具下的iostat命令。

1.ASMCMD工具iostat命令。

ASMCMD [+] > help iostat
        iostat

        Displays I/O statistics for Oracle ASM disks in mounted disk groups.

        iostat [-et][--io] [--suppressheader] [--region] [-G diskgroup] [interval]

        iostat lists disk group statistics using the V$ASM_DISK_IOSTAT view.
        The options for the iostat command are described below.

        -e              - Displays error statistics (Read_Err, Write_Err).
        -G diskgroup    - Displays statistics for the disk group name.
        --suppressheader        - Suppresses column headings.
        --io            - Displays information in number of I/Os, instead 
                          of bytes.
        -t              - Displays time statistics (Read_Time, Write_Time).
        --region        - Displays information for cold and hot disk regions
                          (Cold_Reads, Cold_Writes, Hot_Reads, Hot_Writes).
        interval        - Refreshes the statistics display based on the 
                          interval value (seconds).

        The attribute descriptions for iostat command output are described 
        below. To view the complete set of statistics for a disk group, 
        use the V$ASM_DISK_IOSTAT view.
        Group_Name              Name of the disk group.
        Dsk_Name                Name of the disk.
        Reads                   Total number of bytes read from the disk. 
                                If the --io option is entered, then the value 
                                is displayed as number of I/Os.
        Writes                  Total number of bytes written from the disk.
                                If the --io option is entered, then the value 
                                is displayed as number of I/Os.
        Cold_Reads              Total number of bytes read from the cold disk 
                                region. If the --io option is entered, then 
                                the value is displayed as number of I/Os.
        Cold_Writes             Total number of bytes written from the cold 
                                disk region. If the --io option is entered,
                                then the value is displayed as number of I/Os.
        Hot_Reads               Total number of bytes read from the hot 
                                disk region. If the --io option is entered,
                                then the value is displayed as number of I/Os.
        Hot_Writes              Total number of bytes written from the hot disk 
                                region. If the --io option is entered, then the 
                                value is displayed as number of I/Os.
        Read_Err                Total number of failed I/O read requests for 
                                the disk.
        Write_Err               Total number of failed I/O write requests for 
                                the disk.
        Read_Time               Total I/O time (in hundredths of a second) for 
                                read requests for the disk if the 
                                TIMED_STATISTICS initialization parameter is 
                                set to TRUE (0 if set to FALSE).
        Write_Time              Total I/O time (in hundredths of a second) for 
                                write requests for the disk if the 
                                TIMED_STATISTICS initialization parameter is 
                                set to TRUE (0 if set to FALSE).

        The following are examples of the iostat command. The first example 
        displays disk I/O statistics for the data disk group in total number 
        of bytes. The second example displays disk I/O statistics for the data
        disk group in total number of I/O operations.


2.执行下面的命令,5秒钟显示一次data磁盘组的IO吞吐量,Reads,Writes单位是bytes。

ASMCMD [+] > iostat -G data 5  
Group_Name  Dsk_Name  Reads   Writes  
DATA        DISK1     233472  6602752  
DATA        DISK2     32768   8192    

Group_Name  Dsk_Name  Reads  Writes  
DATA        DISK1     0.00   1638.40  
DATA        DISK2     0.00   0.00    

Group_Name  Dsk_Name  Reads  Writes  
DATA        DISK1     0.00   819.20  
DATA        DISK2     0.00   0.00    

Group_Name  Dsk_Name  Reads  Writes  
DATA        DISK1     0.00   1638.40  
DATA        DISK2     0.00   0.00    

Group_Name  Dsk_Name  Reads  Writes  
DATA        DISK1     0.00   1638.40  
DATA        DISK2     0.00   0.00    

Group_Name  Dsk_Name  Reads  Writes  
DATA        DISK1     0.00   819.20  
DATA        DISK2     0.00   0.00    

--end--

如何修改ASM的sys密码

如何将ASM中的数据文件复制到操作系统中

Oracle 11g RAC ASM磁盘全部丢失后的恢复

Oracle 11g从入门到精通 PDF+光盘源代码

RHEL6 ASM方式安装Oracle 11g R2

Oracle 10g 手工创建ASM数据库

Ubuntu 12.04(amd64)安装完Oracle 11gR2后各种问题解决方法

如何修改Oracle 10g ASM的sys密码


    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • cacti监控不到磁盘数据,请高手指教!
  • 请问,在unix中用C/C++写的监控程序有没有可以获得磁盘空间的函数?
  • 请问在solaris下如何编程实现对cpu、mem、磁盘占用率的监控
  • 用bitmap实现磁盘的读写监控
  • Docker监控以及cAdvisor和Prometheus监控工具的对比
  • 网关监控(网管监控):监控员工上网内容、进出电子邮件内容、聊天内容、上传和下载内容,过滤不良网站;设置一部分电子邮件帐号只能够发
  • 针对Docker容器的监控指标
  • 业务系统监控 ​kaleido
  • shell监控脚本实例—监控mysql主从复制
  • Metric监控系统 node-bell
  • 网络接口监控 WMND
  • 应用监控系统 HawtIO
  • linux系统下如何监控和获取用户行为(高分悬赏)
  • 系统状态监控工具 ProcMeter3
  • Web服务器文件安全监控平台 Falcon
  • LDAP监控软件 CN=Monitor
  • 网络监控系统 FreeNATS
  • 网络管理与监控系统 JFFNMS
  • 关于文件监控~~~~~~~~~~~~~
  • nagios监控不正常
  • 数据库监控工具 TrafficObjects
  • Ganglia的批量作业监控插件 Job Monarch
  • OSA监控精灵
  • 监控多个文件目录
  • Redis 服务器监控系统 Angel


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3