[systemd-devel] order of sd_journal_query_unique()?

Chris Morgan chmorgan at gmail.com
Fri Mar 6 11:25:36 PST 2015


I was using a journal iterator to search from the newest journal entry
backwards for a matching field, using SD_JOURNAL_FOREACH_BACKWARDS.
This appears to be pretty slow but journalctl is really fast. I went
looking and found sd_journal_query_unique() (although I'm not 100%
positive this is why journalctl is faster).

Looking at http://www.freedesktop.org/software/systemd/man/sd_journal_query_unique.html
there isn't any mention of ordering or direction.

Is this search finding journal entries that are newest to oldest or???

Chris


More information about the systemd-devel mailing list