<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 6, 2016 at 7:04 AM, P.R.Dinesh <span dir="ltr"><<a href="mailto:pr.dinesh@gmail.com" target="_blank">pr.dinesh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am using systemd, journald and systemd-coredump in my system. When a process crashes the systemd-coredump util handles the core dump and logs a message in the journal with <span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1</span><div><font color="#183691" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;line-height:16.8px;white-space:pre-wrap"><br></span></font></div><div>Now I want to add a routine which will do post crash activities, For eg., blinking a fault led in the system. </div><div><br></div><div>I think we can poll the journal for the crash message, but is there any other optimal way to register for a callback from journal which will be triggered whenever a message of particular MESSAGE_ID is received.</div></div></blockquote><div><br></div><div>Well, you can use sd_journal_get_fd()+poll() instead of periodic checking, but other than that, there aren't any sort of callbacks yet – you'll have to filter out messages on your side.</div><div><br></div><div>Though I wonder if systemd-journal-remote could help here? If there are multiple clients, doing the filtering in sd-journal-remote would probably be more efficient than in each client...</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>