Procwatcher: Script to Monitor and Examine Oracle DB and Clusterware Processes

Procwatcher是一款用于监控Oracle数据库及集群进程的工具,能够收集进程堆栈跟踪和SQL数据,适用于解决会话级挂起、性能问题及内存管理等场景。本文档详细介绍了其安装要求、适用场景及命令操作。

 

 

Purpose

Procwatcher is a tool to examine and monitor Oracle database and/or clusterware processes at an interval.   The tool will collect stack traces of these processes using Oracle tools like oradebug short_stack and/or OS debuggers like pstack, gdb, dbx, or ladebug and collect SQL data if specified.

 

Requirements

  • Must have /bin and /usr/bin in your $PATH
  • Have your instance_name or db_name set in the oratab and/or set the $ORACLE_HOME env variable.(PRW searches the oratab for the SID it finds and if it can't find the SID in the oratab it will default to $ORACLE_HOME). Procwatcher cannot function properly if it cannot find an $ORACLE_HOME to use.
  • Run Procwatcher as the oracle software owner if you are only troubleshooting homes/instances for that user. If you are troubleshooting clusterware processes (EXAMINE_CLUSTER=true or are troubleshooting for multiple oracle users) run as root.
  • If you are monitoring the clusterware you must have the relevant OS debugger installed on your platform; PRW looks for:

Linux - /usr/bin/gdb
HP-UX and HP Itanium - /opt/langtools/bin/gdb64 or /usr/ccs/bin/gdb64
Sun - /usr/bin/pstack
IBM AIX - /bin/procstack or /bin/dbx
HP Tru64 - /bin/ladebug

 

 

Procwatcher is Ideal for:

  • Session level hangs or severe contention in the database/instance. See Note: 1352623.1
  • Severe performance issues. See Note: 1352623.1
  • Instance evictions and/or DRM timeouts.
  • Clusterware or DB processes stuck or consuming high CPU (must set EXAMINE_CLUSTER=true and run as root for clusterware processes)
  • ORA-4031 and SGA memory management issues. (Set sgamemwatch=diag or sgamemwatch=avoid4031 (not the default). See Note: 1355030.1
  • ORA-4030 and DB process memory issues. (Set USE_SQL=true and process_memory=y).
  • RMAN slowness/contention during a backup. (Set USE_SQL=true and rmanclient=y).

Procwatcher is Not Ideal for...

  • Node evictions/reboots. In order to troubleshoot these you would have to enable Procwatcher for a process(es) that are capable of rebooting the machine. If the OS debugger suspends the processs for too long *that* could cause a reboot of the machine. I would only use Procwatcher for a node eviction/reboot if the problem was reproducing on a test system and I didn't care of the node got rebooted. Even in that case the INTERVAL would need to be set low (30) and many options would have to be turned off to get the cycle time low enough (EXAMINE_BG=false, USE_SQL=false, probably removing additional processes from the CLUSTERPROCS list).
  • Non-severe database performance issues. AWR/ADDM/statspack are better options for this...
  • Most installation or upgrade issues. We aren't getting data for this unless we are at a stage of the installation/upgrade where key processes are already started.

 

Procwatcher User Commands

To start Procwatcher:

./prw.sh start



Or if you want to start on all nodes in a clustered environment:

./prw.sh start all




To stop Procwatcher: :

./prw.sh stop



Or if you want to stop on all nodes in a clustered environment:

./prw.sh stop all



To check the status of Procwatcher:

./prw.sh stat

 

To package up Procwatcher files to upload to support:

./prw.sh pack



All user syntax available:

./prw.sh help

 

本系统采用Python编程语言中的Flask框架作为基础架构,实现了一个面向二手商品交易的网络平台。该平台具备完整的前端展示与后端管理功能,适合用作学术研究、课程作业或个人技术能力训练的实际案例。Flask作为一种简洁高效的Web开发框架,能够以模块化方式支持网站功能的快速搭建。在本系统中,Flask承担了核心服务端的角色,主要完成请求响应处理、数据运算及业务流程控制等任务。 开发工具选用PyCharm集成环境。这款由JetBrains推出的Python专用编辑器集成了智能代码提示、错误检测、程序调试与自动化测试等多种辅助功能,显著提升了软件编写与维护的效率。通过该环境,开发者可便捷地进行项目组织与问题排查。 数据存储部分采用MySQL关系型数据库管理系统,用于保存会员资料、产品信息及订单历史等内容。MySQL具备良好的稳定性和处理性能,常被各类网络服务所采用。在Flask体系内,一般会配合SQLAlchemy这一对象关系映射工具使用,使得开发者能够通过Python类对象直接管理数据实体,避免手动编写结构化查询语句。 缓存服务由Redis内存数据库提供支持。Redis是一种支持持久化存储的开放源代码内存键值存储系统,可作为高速缓存、临时数据库或消息代理使用。在本系统中,Redis可能用于暂存高频访问的商品内容、用户登录状态等动态信息,从而加快数据获取速度,降低主数据库的查询负载。 项目归档文件“Python_Flask_ershou-master”预计包含以下关键组成部分: 1. 应用主程序(app.py):包含Flask应用初始化代码及请求路径映射规则。 2. 数据模型定义(models.py):通过SQLAlchemy声明与数据库表对应的类结构。 3. 视图控制器(views.py):包含处理各类网络请求并生成回复的业务函数,涵盖账户管理、商品展示、订单处理等操作。 4. 页面模板目录(templates):存储用于动态生成网页的HTML模板文件。 5. 静态资源目录(static):存放层叠样式表、客户端脚本及图像等固定资源。 6. 依赖清单(requirements.txt):记录项目运行所需的所有第三方Python库及其版本号,便于环境重建。 7. 参数配置(config.py):集中设置数据库连接参数、缓存服务器地址等运行配置。 此外,项目还可能包含自动化测试用例、数据库结构迁移工具以及运行部署相关文档。通过构建此系统,开发者能够系统掌握Flask框架的实际运用,理解用户身份验证、访问控制、数据持久化、界面动态生成等网络应用关键技术,同时熟悉MySQL数据库运维与Redis缓存机制的应用方法。对于入门阶段的学习者而言,该系统可作为综合性的实践训练载体,有效促进Python网络编程技能的提升。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
在当代储能装置监控技术领域,精确测定锂离子电池的电荷存量(即荷电状态,SOC)是一项关键任务,它直接关系到电池运行的安全性、耐久性及整体效能。随着电动车辆产业的迅速扩张,业界对锂离子电池SOC测算的精确度与稳定性提出了更为严格的标准。为此,构建一套能够在多样化运行场景及温度条件下实现高精度SOC测算的技术方案具有显著的实际意义。 本文介绍一种结合Transformer架构与容积卡尔曼滤波(CKF)的混合式SOC测算系统。Transformer架构最初在语言处理领域获得突破性进展,其特有的注意力机制能够有效捕捉时间序列数据中的长期关联特征。在本应用中,该架构用于分析电池工作过程中采集的电压、电流与温度等时序数据,从而识别电池在不同放电区间的动态行为规律。 容积卡尔曼滤波作为一种适用于非线性系统的状态估计算法,在本系统中负责对Transformer提取的特征数据进行递归融合与实时推算,以持续更新电池的SOC值。该方法增强了系统在测量噪声干扰下的稳定性,确保了测算结果在不同环境条件下的可靠性。 本系统在多种标准驾驶循环(如BJDST、DST、FUDS、US06)及不同环境温度(0°C、25°C、45°C)下进行了验证测试,这些条件涵盖了电动车辆在实际使用中可能遇到的主要工况与气候范围。实验表明,该系统在低温、常温及高温环境中,面对差异化的负载变化,均能保持较高的测算准确性。 随附文档中提供了该系统的补充说明、实验数据及技术细节,核心代码与模型文件亦包含于对应目录中,可供进一步研究或工程部署使用。该融合架构不仅在方法层面具有创新性,同时展现了良好的工程适用性与测算精度,对推进电池管理技术的进步具有积极意义。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
代码转载自:https://pan.quark.cn/s/9e296fe8986c 实验题目为“复杂模型机的设计与实现”。 _1. 实验目的与要求:目的:1. 熟练掌握并达成较为复杂的计算机原理。 2. 本实验增加了16条机器指令,全面运用所学的计算机原理知识,借助扩展的机器指令设计并编写程序,然后在CPU中执行所编写的程序。 要求:依照练习一和练习二的要求完成相应的操作,并上机进行调试和运行。 2. 实验方案:……实验报告的标题设定为“广东工业大学计组实验报告复杂模型机的设计与实现六”,主要围绕计算机组成原理中的复杂模型机设计和实现展开。 实验的宗旨在于让学生深入理解和实际操作计算机原理,特别是通过增加16条机器指令,来全面运用所学知识设计程序,并在CPU中运行这些程序。 实验的具体要求包括:1. 掌握复杂的计算机工作原理,这要求学生不仅具备扎实的理论知识,还需要拥有将理论转化为实际操作的能力。 2. 实验中增加了16条机器指令,这涉及到计算机指令集的扩展和设计,可能包含算术运算、逻辑运算、数据传输和控制流程等指令。 3. 学生需要运用扩展的机器指令编写程序,并通过CPU进行运行和调试,这涉及到编程、汇编和CPU执行流程的理解。 4. 依照练习一和练习二的要求完成操作,这表明实验包含分阶段的练习任务,需要逐步完成并验证。 实验方案包括:1. 实验连线:保证硬件连接准确无误,这是任何电子实验的基础,对于计算机实验,这通常涵盖CPU、内存、输入/输出设备等组件的连接。 2. 实验程序:提供了范例程序,包括机器指令程序和微指令程序的微代码。 这部分内容展示了如何利用扩展的机器指令编写程序,以及对应的微指令实现,有助于理解计算机内部的低级操作。 在实验结果和数据处理部分,学生需要:1. 在程...
In SystemVerilog, there are several types of coverage used to assess the thoroughness of testing. ### Code Coverage - **Line Coverage**: It ensures that each line of code in the design is executed at least once. For example: ```systemverilog module code_coverage_example; reg a, b, c; always @(*) begin c = a & b; // This line's execution is tracked by line coverage end endmodule ``` - **Branch Coverage**: Guarantees that all possible branches of conditional statements (such as if - else, case statements) are executed. ```systemverilog module branch_coverage; reg [1:0] sel; reg out; always @(*) begin if (sel == 2'b00) begin out = 1'b0; end else if (sel == 2'b01) begin out = 1'b1; end else begin out = 1'bx; end end endmodule ``` - **Condition Coverage**: Verifies all possible outcomes of conditional expressions in the design, ensuring that all possible value combinations of conditions are tested. ```systemverilog covergroup condition_cg @(posedge clk); cond_cover: coverpoint (condition1 && condition2); endgroup ``` ### Functional Coverage Functional coverage focuses on whether the functional features of the design are fully tested. It is defined based on the design's functional specifications. For example, for a processor, functional coverage may include the execution of the instruction set and testing of different operation modes. ```systemverilog covergroup functional_cg; opcode_cover: coverpoint cpu.opcode; mode_cover: coverpoint cpu.mode; endgroup ``` ### Assertion Coverage Assertion coverage is used to verify whether the assertions in the design are triggered. Assertions are statements used to check if the design behavior meets expectations. By assertion coverage, it can be ensured that assertions are correctly executed during testing. ```systemverilog module assertion_coverage; reg clk, rst; reg [7:0] data; always @(posedge clk) begin assert (data < 8'hFF) else $error("Data out of range"); end endmodule ``` ### Toggle Coverage Toggle coverage measures the state changes of signals during testing, ensuring that all possible signal transitions (from 0 to 1, from 1 to 0) are tested. ```systemverilog covergroup toggle_cg @(posedge clk); toggle_cover: coverpoint signal iff (enable) { bins rise = (0 => 1); bins fall = (1 => 0); } endgroup ``` ### Path Coverage Path coverage is used to verify the behavior of different signal paths in the design, ensuring that all possible signal propagation paths are tested. ```systemverilog module path_coverage; reg a, b, c, d; wire e, f; assign e = a & b; assign f = c | d; wire out = e ^ f; endmodule ``` ### Interface Coverage Interface coverage focuses on the usage of interfaces in the design, ensuring that all functions and protocols of the interface are fully tested. For example, for a bus interface, interface coverage may include different bus transaction types and address ranges. ```systemverilog covergroup interface_cg; transaction_type_cover: coverpoint bus_if.transaction_type; address_range_cover: coverpoint bus_if.address; endgroup ``` ### Transaction Coverage Transaction coverage is based on transactions in the design. It ensures that all possible transaction types and sequences are tested. For example, for a communication system, transaction coverage may include different message types and message lengths. ```systemverilog covergroup transaction_cg; message_type_cover: coverpoint comm_system.message_type; message_length_cover: coverpoint comm_system.message_length; endgroup ``` ### State Machine Coverage State machine coverage verifies the behavior of state machines, ensuring that all states and state transitions of the state machine are fully tested, which helps to check if the state machine performs state transitions correctly according to the design specifications and avoid issues such as state loss or illegal state transitions [^1]. ```systemverilog covergroup state_machine_cg @(posedge clk); state_transition: coverpoint state_machine.current_state -> state_machine.next_state; endgroup ``` ### Block Coverage Block coverage focuses on the execution of code blocks, ensuring that each code block (such as always blocks, tasks, functions) in the design is executed at least once. ```systemverilog covergroup block_cg; always_block_cover: coverpoint always_block_executed; task_cover: coverpoint task_executed; endgroup ``` ### Weighted Coverage Weighted coverage can be used to specify the proportion of a certain coverage point in the overall. For example, when covering a counter, the goal is to observe a range rather than collect all cases. In this case, option.weight = 0 can be set, which means that the coverage rate of this group or point is not calculated in the overall coverage statistics [^2]. ```systemverilog covergroup weighted_cg; coverpoint counter { option.weight = 5; bins small = {[0:10]}; bins medium = {[11:50]}; bins large = {[51:$]}; } endgroup ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值