自动错误报告工具 (ABRT) 如何工作以在运行时捕获核心?

发布于 2024-10-16 00:00:00 字数 207 浏览 3 评论 0原文

我的 fedora12 安装了一个名为 ABRT 的工具,可能是 GNOME 附带的。这 该工具在后台运行并实时报告任何崩溃的进程。

我使用了一个能够捕获 SIGSEGV 信号的信号处理程序,即它可以报告 坠毁了。

存在哪些其他方法可以让进程在没有父子连接的情况下获取有关其他进程的状态(尤其是核心)的信息?

有什么想法吗?这似乎是一个非常有趣的问题。

My fedora12 installed a tool called ABRT that comes probably with GNOME. This
tool operates at the background and reports at realtime any process that has crashed.

I have used a signal handler that was able to catch a SIGSEGV signal, ie it could report
crashed.

What other ways exist in order a process to get information about the state (especially a core) of an other process without having parent-child connection?

Any ideas? It seems a very interesting issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

流星番茄 2024-10-23 00:00:00

毕竟,ABRT 是开源的,所以为什么不看看他们的代码此处解释了该架构 - 看起来他们监控$COREDUMPDIR检测何时出现新的核心文件。

ABRT is open source, after all, so why not look at their code. The architecture is explained here -- it looks like they monitor $COREDUMPDIR to detect when a new core file appears.

太阳哥哥 2024-10-23 00:00:00

您的问题并不完全清楚,但可以使用 gcore 获取正在运行的进程的核心:

gcore(1)                           GNU Tools                          gcore(1)

NAME
       gcore - Generate a core file for a running process

SYNOPSIS
       gcore [-o filename] pid

DESCRIPTION
       gcore  generates  a  core file for the process specified by its process
       ID, pid. By default, the core file is written to core.pid, in the  cur‐
       rent directory.

       -o filename
              write core file to filename instead of core.pid

Your question is not entirely clear, but it is possible to get a core of a running process using gcore:

gcore(1)                           GNU Tools                          gcore(1)

NAME
       gcore - Generate a core file for a running process

SYNOPSIS
       gcore [-o filename] pid

DESCRIPTION
       gcore  generates  a  core file for the process specified by its process
       ID, pid. By default, the core file is written to core.pid, in the  cur‐
       rent directory.

       -o filename
              write core file to filename instead of core.pid
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文