[systemd-devel] order of sd_journal_query_unique()?
Chris Morgan
chmorgan at gmail.com
Fri Mar 6 16:04:15 PST 2015
On Fri, Mar 6, 2015 at 6:45 PM, Daurnimator <quae at daurnimator.com> wrote:
> On 6 March 2015 at 16:13, Chris Morgan <chmorgan at gmail.com> wrote:
>> So is SD_JOURNAL_FOREACH_BACKWARDS the fastest way to find the newest
>> journal entry with a given field? journalctl seems a ton faster than
>> my c application is when I search for a given field that is not
>> present. And by search I'm doing:
>>
>> journalctl --user BLAH=1
>>
>> Chris
>
> To find the newest journal entry:
> - sd_journal_seek_tail
> - sd_journal_add_match and similar to add criteria
> - sd_journal_previous
Yes, this looks much more efficient.
Thank you.
Chris
More information about the systemd-devel
mailing list