[systemd-devel] Journalctl --list-boots problem

Martin Townsend mtownsend1973 at gmail.com
Mon Oct 7 17:32:34 UTC 2019


Hi,

I'm trying to get journalctl --list-boots working but it always shows
the current boot

# journalctl --list-boots
 0 c064e8c1d1a2403f9370e550bb74ecb2 Mon 2019-10-07 17:02:44 UTC—Mon
2019-10-07 17:17:56 UTC

I'm using persistent storage and I'm sure I have /var/log/journal
setup correctly because if I specify the directory I get the list I'm
after

# journalctl -D /var/log/journal --list-boots
-2 90b892156cf240cfb70fbc0129163a7c Mon 2019-10-07 17:02:11 UTC—Mon
2019-10-07 17:02:37 UTC
-1 c064e8c1d1a2403f9370e550bb74ecb2 Mon 2019-10-07 17:02:44 UTC—Mon
2019-10-07 17:31:17 UTC
 0 ded3a4118bfc4f9682f99c3e4e2d941a Mon 2019-10-07 17:31:26 UTC—Mon
2019-10-07 17:31:39 UTC

I'm looking through the code and in sd-journal.c it should add the
/var/log/journal in the function add_search_paths.  Any ideas why it's
now working unless I specify the directory explicitly. I'm building
systemd using Yocto (thud) release.

# journalctl --version
systemd 239
+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP
-LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS
+KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid

Here's the end of the configure task in case it helps

Message: systemd 239
         split /usr:                        true
         split bin-sbin:                    true
         prefix directory:                  /usr
         rootprefix directory:              /
         sysconf directory:                 /etc
         include directory:                 /usr/include
         lib directory:                     /usr/lib
         rootlib directory:                 /lib
         SysV init scripts:                 /etc/init.d
         SysV rc?.d directories:            /etc
         PAM modules directory:             /lib/security
         PAM configuration directory:       /etc/pam.d
         RPM macros directory:              /usr/lib/rpm/macros.d
         modprobe.d directory:              /lib/modprobe.d
         D-Bus policy directory:            /usr/share/dbus-1/system.d
         D-Bus session directory:           /usr/share/dbus-1/services
         D-Bus system directory:            /usr/share/dbus-1/system-services
         bash completions directory:
/usr/share/bash-completion/completions
         zsh completions directory:         /usr/share/zsh/site-functions
         extra start script:                /etc/rc.local
         extra stop script:                 /usr/sbin/halt.local
         debug shell:                       /bin/sh @ /dev/tty9
         TTY GID:                           5
         users GID:                         -
         maximum system UID:                999
         maximum system GID:                999
         minimum dynamic UID:               61184
         maximum dynamic UID:               65519
         minimum container UID base:        524288
         maximum container UID base:        1878982656
         /dev/kvm access mode:              0666
         render group access mode:          0666
         certificate root directory:        /etc/ssl
         support URL:
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
         nobody user name:                  nobody
         nobody group name:                 nobody
         fallback hostname:                 localhost
         symbolic gateway hostnames:        _gateway
         default DNSSEC mode:               no
         default DNS-over-TLS mode:         no
         default cgroup hierarchy:          hybrid
         default KillUserProcesses setting: true
         default DNS servers:               8.8.8.8
                                            8.8.4.4
                                            2001:4860:4860::8888
                                            2001:4860:4860::8844
         default NTP servers:               time1.google.com
                                            time2.google.com
                                            time3.google.com
                                            time4.google.com
         time epoch:                        0 (1970-01-01T00:00:00+00:00)

         enabled features: PAM, IMA, SMACK, xz, ACL, idn, nss-systemd,
binfmt, vconsole, quotacheck, tmpfiles
, environment.d, sysusers, firstboot, randomseed, rfkill, logind,
machined, hostnamed, timedated, localed, ne
tworkd, resolve, polkit, kmod, blkid, nss-myhostname, hwdb, tpm, SysV
compat, utmp, ldconfig, hibernate, adm
group, wheel group, gshadow

         disabled features: libcryptsetup, AUDIT, AppArmor, SELinux,
SECCOMP, zlib, lz4, bzip2, gcrypt, qrenc
ode, microhttpd, gnutls, libcurl, libidn2, libidn, libiptc, elfutils,
backlight, portabled, importd, timesync
d, DNS-over-TLS, coredump, legacy pkla, efi, gnu-efi, xkbcommon,
pcre2, dbus, glib, man pages, html pages, ma
n page indices, debug hashmap, debug mmap cache, valgrind

Many Thanks,
Martin.


More information about the systemd-devel mailing list