Re: [systemd-devel] FixMe need a coredump HOOK

2014-06-08 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Jun 08, 2014 at 08:49:10PM +0800, Leslie Zhai wrote: > Hi Zbyszek, > > Thanks for your reply :) > > OK, it is enough to collect user space coredump info for bug > reporter frontend :) Hi, if you do polling yourself, sd_journal_wait() is unnecessary and harmful. > 1. const char *field,

Re: [systemd-devel] FixMe need a coredump HOOK

2014-06-08 Thread Leslie Zhai
Hi Mantas, Thanks for your reply :) Yes, I use sd_journal_get_fd() API as Zbigniew mentioned https://github.com/AOSC-Dev/FixMe/blob/master/test/test_systemd_journal.c#L22 But sd_journal_get_data print out no such file or directory error COREDUMP=ELF https://github.com/AOSC-Dev/FixMe/blob/ma

Re: [systemd-devel] FixMe need a coredump HOOK

2014-06-08 Thread Leslie Zhai
Hi Zbyszek, Thanks for your reply :) OK, it is enough to collect user space coredump info for bug reporter frontend :) 1. const char *field, the second parameter of sd_journal_get_data, is able to set filter to limit the entries, isn't it? 2. I simply init pollfd struct with fds[0].fd = sd

Re: [systemd-devel] FixMe need a coredump HOOK

2014-06-07 Thread Mantas Mikulėnas
On Sat, Jun 7, 2014 at 8:49 AM, Leslie Zhai 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

Re: [systemd-devel] FixMe need a coredump HOOK

2014-06-07 Thread Zbigniew Jędrzejewski-Szmek
Hi, the coredump machinery provided by the kernel only works for user space processes. Kernel faults usually end in a traceback being printed to the console and are handled differently. To receive information about past and future coredumps stored in the journal you need to: 1. Add a filter which

[systemd-devel] FixMe need a coredump HOOK

2014-06-06 Thread Leslie Zhai
Hi systemd developers, I am a newbie of systemd, and I only read some source code such as systemd-timedated for SetTime && SetTimezone via dbus interface :) And at present I need to develop a bug reporter frontend named FixMe https://github.com/AOSC-Dev/FixMe So I read about systemd-journald for