搜索并聚合siebel组件崩溃信息到一个好的报告中。
siebel-crash-report的Python项目详细描述
Siebel崩溃报告
搜索和聚合siebel组件的python项目会将信息崩溃到一个好的报告中。
功能
自动执行检索Siebel服务器信息所需的所有步骤 组件崩溃以将报告发送给Oracle支持部门。
从以下来源搜索和检索信息:
- 内存转储(
core.dump
文件)本身使用gdb。 - 与萨马纳利泽的罗斯福档案。
- Siebel企业日志文件。
- 将FDR中的信息与企业日志文件关联起来。
- JSON摘要报告。
根据需要创建csv(来自sarmanalyzer)和gdb文本输出
在由crash_reporter.ini
中的crash_dir
项定义的目录中
配置文件,以及JSON摘要报告和
crash.txt
。
所有信息(除了csv和gdb输出)都被打印到STDOUT
,因此
它将在cron作业中一起运行,并通过管道将其发送到mail
程序。
下面是json报告的一个示例(识别出两个崩溃):
{18192:{'core':{'last_mod':'2016-09-08 17:46:08','executable':'siebprocmw','size':211382272,'generated_by':'SIGABRT','filename':'core.18192'},'fdr':{'last_mod':'2016-09-08 17:46:07','size':5000032,'filename':'T201609081518_P018192.fdr'},'thread':'-247841904'},28019:{'core':{'last_mod':'2016-09-09 22:40:22','executable':'siebmtshmw','size':356610048,'generated_by':'SIGABRT','filename':'core.28019'},'fdr':{'last_mod':'2016-09-09 22:40:22','size':5000032,'filename':'T201609092237_P028019.fdr'},'thread':'-171263680'}}
core和fdr文件可能会在之后被删除(请参阅配置文件) 分析完成。
这个脚本只能在linux上运行。预计gdb
程序
提取核心转储回溯)和iniparse
(可用作RPM
redhat、centos和oracle enterprise linux)python模块上的包是
安装。
脚本崩溃监视器还有一个在线文档。你可以检查一下 使用:
$ pydoc siebel.maintenance.crash
要为此模块生成HTML文档,请发出以下命令:
$ pydoc -w siebel.maintenance.crash
如何使用
要求
- python 2.x或3.x.
- Siebel服务器二进制文件和配置就位。
- Linux(所有设置都特定于Linux)。
- 国民生产总值。
安装
您应该可以使用pip
:
$ pip install siebel-crash-report
然后需要配置crash_reporter程序并最终运行它 反对你的Siebel Enterprise。
配置
您的主目录中必须有一个ini配置文件
$HOME/.crash.ini
。
下面是一个INI配置文件示例:
[main];location of Siebel binariesbin_dir=/server/81/siebsrvr/bin; location of where the crashes information will be stored. A subdirectory will be created there with filename "crash_dir" appended with datetime.date.today stringcrash_dir=/server/crash_dir; location of the Siebel Enterprise log filesenterprise_log_dir=/server/foobar/siebel/81/siebsrvr/enterprises/foobar/myserver/log; location of Siebel Enterprise log archiveslog_archive=/server/foobar/siebel/81/siebsrvr/enterprises/foobar/myserver/logarchive; the file name of the Siebel Enterprise log file (only the file name, not the complete path)enterprise_log_file=foobar.myserver.logclean_files=yes
可以在模块文档中查看更多信息:
$ pydoc siebel.maintenance.crash.readConfig
开发
如果你想参与这个项目的开发,这里有一些 基本细节开始。
要求
- python 2.x和3.x.
- python模块(请参见
requirements.txt
和requirements-3x.txt
)。 - Siebel服务器二进制文件和配置就位。
- Linux(所有设置都特定于Linux)。
- 国民生产总值。
运行测试
为了使用pytest
运行测试,请设置PYTHONPATH
环境
变量优先:
$ export PYTHONPATH="$PWD/src"
$ pytest
已知问题
这个脚本是为在Python2.4上运行而创建的(我知道,很老了,但这就是为什么 我们今天回来了),但是在Python2.7中应该可以正常工作。
应支持python 3.x。使用requirements-3x.txt
文件安装
通过VenV的模块。