How Auto Bug Report Tool (ABRT) works in order to catch cores at the runtime?
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 intere开发者_Go百科sting issue.
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.
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
精彩评论