使用RDA巡检MYSQL数据库

本文介绍了RDA(Remote Diagnostic Agent)工具的基本使用方法及其在Oracle和MySQL数据库中的应用。RDA是一个由Perl脚本编写的工具,用于收集和分析数据库信息,帮助简化日常监控和故障排查工作。文章详细记录了RDA的配置过程及如何生成巡检报告。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

RDA(RemoteDiagnostic Agent)是oracle用来收集、分析数据库的工具,运行该工具不会改变系统的任何参数,RDA收集的相关数据非常全面,可以简化我们日常监控、分析数据库的工作。
一般Oracle 原厂的人巡检也是使用RDA工具。 不过一般国内的DBA 巡检时很少使用这个工具,一般都是通过AWR 或者自己整几个脚本,跑了在分析一下就ok了。
在MOS 上创建SR(Service Request)时(我08年刚接触Oracle时,那是MOS 上还是称呼Tar,后来改成了SR了)。 Oracle 也会要求客户上传RDA的信息。 通过RDA 可以快速的了解系统的状况。
RDA 是用Perl 脚本写出来的。 可以通过MOS 下载RDA。 RDA 是一个客户端,解压缩之后就可以直接使用了。
同样RDA也可以对mysql数据库进行简单的检查,并生成检查报告。

参考文档:
Using Remote Diagnostic Agent (RDA) 4 with MySQL Server and MySQL Cluster (文档 ID 1437541.1)

实验环境:
Server version: 5.6.37

命令
RDA模块配置
./rda.sh -S  MYSQ
生成巡检结果
./rda.sh -v MYSQ

实验过程
[mysql@jing1 rda]$ ./rda.sh -S  MYSQ
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.CB18030"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Enter the network domain name for this server
> jing1


------------------------------------------------------------------------------
RDA.BEGIN: Initializes the Data Collection
------------------------------------------------------------------------------
Enter the Oracle home to be used for data analysis
> /usr/local/mysql


------------------------------------------------------------------------------
RDA.CONFIG: Collects Key Configuration Information
------------------------------------------------------------------------------
------------------------------------------------------------------------------
DB.MYSQ: Collects Oracle MySQL Server Information
------------------------------------------------------------------------------
Do you want RDA to collect Oracle MySQL Server information (Y/N)?
Press Return to accept the default (Y)



Enter the full path of the Oracle MySQL Server configuration file
Press Return to accept the default (/etc/my.cnf)
> /data/mysqldata/3306/my.cnf


Enter the user name for the Oracle MySQL Server connection
> system


------------------------------------------------------------------------------
RDA.OCM: Set up the Configuration Manager Interface
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.STATUS: Produces the Remote Data Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.LOAD: Produces the External Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.FILTER: Controls Report Content Filtering
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.END: Finalizes the Data Collection
------------------------------------------------------------------------------
[mysql@jing1 rda]$ 
[mysql@jing1 rda]$ 
[mysql@jing1 rda]$ ./rda.sh -v MYSQ
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.CB18030"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Collecting diagnostic data ...
------------------------------------------------------------------------------
RDA Data Collection Started 04-Dec-2017 10:26:01
------------------------------------------------------------------------------
Processing RDA.BEGIN module ...
 Inside BEGIN module, testing the RDA engine code build
 Inside BEGIN module, testing the report directory
 Inside BEGIN module, testing the module targets
 Inside BEGIN module, launching parallel executions
Processing RDA.CONFIG module ...
 Inside CONFIG module, listing Oracle homes
 Inside CONFIG module, getting Oracle home inventory (can take time)
Processing DB.MYSQ module ...
 Inside MYSQ module, gathering database information (can take time)
Enter password: 
 Inside MYSQ module, collecting the configuration files
 Inside cat_report, looking for my.cnf in /data/mysqldata/3306
 Inside MYSQ module, listing the files in /data/mysqldata/3306/data directory
 Inside MYSQ module, collecting the log files
Processing RDA.LOAD module ...
 Inside LOAD module, running CRS diagnostic collection tool
 Inside LOAD module, gathering system comparison reports
 Inside LOAD module, gathering EPM validation reports
 Inside LOAD module, gathering HCVE reports
 Inside LOAD module, gathering JRockit tool reports
 Inside LOAD module, gathering jvm tool reports
 Inside LOAD module, gathering Trace Merge reports
 Inside LOAD module, gathering Network Advisor reports
 Inside LOAD module, gathering Oracle Configuration Manager information
 Inside LOAD module, gathering ORA600 reports
 Inside LOAD module, gathering ORADDC reports
 Inside LOAD module, gathering OSWatcher information
 Inside LOAD module, gathering database performance reports
 Inside LOAD module, gathering the most recent redo tool results
 Inside LOAD module, gathering the most recent TLsecure report
 Inside LOAD module, gathering Siebel crash reports
 Inside LOAD module, gathering siga/sosreport/sysreport reports
Processing RDA.END module ...
 Inside END module, gathering system information
 Inside END module, getting CPU information (linux)
 Inside END module, getting memory information (linux)
 Inside END module, producing the file catalog
 Inside END module, producing target overview
 Inside END module, waiting for parallel execution completion
 Inside END module, producing setting overview
------------------------------------------------------------------------------
RDA Data Collection Ended 04-Dec-2017 10:29:57
------------------------------------------------------------------------------
Generating the reports ...
        - collect/DB_MYSQ_datadir_overview.txt ...
        - collect/RDA_END_report.txt ...
        - collect/DB_MYSQ_db_info.txt ...
        - collect/RDA_END_system.txt ...
        - collect/RDA_END_target.txt ...
        - collect/RDA_END_files.txt ...
        - collect/DB_MYSQ_cfg_my_cnf.txt ...
        - collect/DB_MYSQ_log_files.txt ...
        - Report index ...
Packaging collection results ...
  You can review the reports by transferring the
  /data/mysqldata/scripts/rda/output directory structure to a location where
  you have web-browser access. Then, point your browser at this file to
  display the reports:
    RDA__start.htm


  Based on your server configuration, some possible alternative approaches
  are:
  - If your client computer with a browser has access to a web-shared
    directory, copy the /data/mysqldata/scripts/rda/output directory structure
    to the web-shared directory and visit this URL:
    http://machine:port/web_shared_directory/RDA__start.htm
  or
  - If your client computer with a browser has FTP access to the server
    computer with the /data/mysqldata/scripts/rda/output directory, visit this
    URL:
    ftp://root@jing1.jing1//data/mysqldata/scripts/rda/output


  If this file was generated to assist in resolving a Service Request, send
  /data/mysqldata/scripts/rda/RDA_output_jing1.zip to Oracle Support by
  uploading the file via My Oracle Support. When sending with FTP, make sure
  you send it in BINARY format.


  Note: Do not submit any health, payment card or other sensitive production
  data that requires protections greater than those specified in the Oracle
  GCS Security Practices
  (http://www.oracle.com/us/support/library/customer-support-security-practices-069170.pdf).
  Information on how to remove data from your submission is available at
  https://support.oracle.com/rs?type=doc&id=1227943.1


RDA-00033: Warning - 2 command(s) not executed in RDA.CONFIG, RDA.END module(s)

操作完成后生成如下检查结果

下载解压后可以进行相关查看:

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29135257/viewspace-2148244/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29135257/viewspace-2148244/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值