[systemd-devel] journalctl to csv

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Jan 28 09:51:45 PST 2013


On Mon, Jan 28, 2013 at 09:05:30PM +0800, Kai Hendry wrote:
> On 28 January 2013 13:26, Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> wrote:
> >> Any ideas how to stream out only new events? Ideally both open & close?
> > I now added MESSAGE_IDs to logind events:
> > #define SD_MESSAGE_LID_OPENED       SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,6f)
> > #define SD_MESSAGE_LID_CLOSED       SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,70)
> > You can reliably filter on those.
> 
> Are there globs or ways to filter on both at the same time? Thanks,

If you give two values for the same field, they are OR-ed together.
So just 'journalctl MESSAGE_ID=b72ea4a2881545a0b50e200e55b9b06f MESSAGE_ID=b72ea4a2881545a0b50e200e55b9b070'
should work.

Zbyszek


More information about the systemd-devel mailing list