[systemd-devel] FixMe need a coredump HOOK

Mantas Mikulėnas grawity at gmail.com
Sat Jun 7 16:18:51 PDT 2014


On Sat, Jun 7, 2014 at 8:49 AM, Leslie Zhai <xiangzhai83 at gmail.com> wrote:
> [...]
> But I do NOT know how to hook coredump in user space...
> I simply cat /proc/sys/kernel/core_pattern
> |/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
>
> Then systemd-coredump collector will be called (HOOKed), for example,
> BANG ... segfault occured in user or kernel space. but there is NO dbus
> interface provided for other App such as bug reporter frontend. so I
> have to inotify /var/log/journal/SUBDIR
> https://github.com/AOSC-Dev/FixMe/blob/master/test/qinotify/qinotify.cpp#L99
>
> Please someone give me some advice, how to hook coredump in user/kernel
> space based on systemd or other LIB, thanks a lot!

inotify is actually the official method for watching journal entries
-- just not directly, but using the sd_journal_get_fd() API that
Zbigniew mentioned...

>From <http://www.freedesktop.org/wiki/Software/systemd/journal-files/>:
> Clients intending to show a live view of the journal should use inotify() for this to watch for files changes.

-- 
Mantas Mikulėnas <grawity at gmail.com>


More information about the systemd-devel mailing list