System logging using systemd journal (not syslogd or klogd)

1,888 views
Skip to first unread message

Smatt

unread,
Jul 10, 2012, 3:33:55 AM7/10/12
to beagl...@googlegroups.com
I've been researching syslog (syslogd, klogd, syslog-ng) to turn on logging functionality on the Beaglebone.  I couldn't find very good documentation.  After a lot of research, I found that this is all handled through systemd journaling.  The problem I have is, when I create the /var/log/journal directory to persist the journal files, I see the following problems:
1. systemd-journalctl does not appear to work properly (does not show all log contents).  If I delete /var/log/journal, then there is no problem
2. systemd-journalctl --follow fails with "Failed to iterate through journal: Cannot allocate memory".   I believe this is due to a bug in systemd-journalctl when persisting the journal.

Can anyone tell me if they have successfully used journaling with systemd for application/system level logging?  Have you persisted the log files and handled log rotation?

My research can be found here:

Koen Kooi

unread,
Jul 10, 2012, 7:28:51 AM7/10/12
to beagl...@googlegroups.com

Op 10 jul. 2012, om 09:33 heeft Smatt het volgende geschreven:

> I've been researching syslog (syslogd, klogd, syslog-ng) to turn on logging functionality on the Beaglebone. I couldn't find very good documentation. After a lot of research, I found that this is all handled through systemd journaling. The problem I have is, when I create the /var/log/journal directory to persist the journal files, I see the following problems:
> 1. systemd-journalctl does not appear to work properly (does not show all log contents). If I delete /var/log/journal, then there is no problem
> 2. systemd-journalctl --follow fails with "Failed to iterate through journal: Cannot allocate memory". I believe this is due to a bug in systemd-journalctl when persisting the journal.
>
> Can anyone tell me if they have successfully used journaling with systemd for application/system level logging? Have you persisted the log files and handled log rotation?

Are you using the latest software/image?

regards,

Koen

Smatt

unread,
Jul 10, 2012, 10:05:28 AM7/10/12
to beagl...@googlegroups.com
Angstrom v2012-01-core Kernel 3.2.5+
systemd v40-r15

Looks like systemd can upgrade: systemd - v40-r15 - v44-45-g3eff420-r27

Is this to be expected for v40-r15?

Koen Kooi

unread,
Jul 10, 2012, 11:00:36 AM7/10/12
to beagl...@googlegroups.com

Op 10 jul. 2012, om 16:05 heeft Smatt het volgende geschreven:

> Angstrom v2012-01-core Kernel 3.2.5+
> systemd v40-r15
>
> Looks like systemd can upgrade: systemd - v40-r15 - v44-45-g3eff420-r27
>
> Is this to be expected for v40-r15?

Yes, but it's recommended to install a new image using a .img file, the 3.2.5+ image is not using the release feeds, but the unstable feeds. the 06.xx and 07.xx images are using the release feeds. E.g. http://dominion.thruhere.net/koen/angstrom/beaglebone/Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.07.06.img.xz has a fixed journald.

regards,

Koen

>
>
> On Tuesday, July 10, 2012 4:28:51 AM UTC-7, Koen Kooi wrote:
>
> Op 10 jul. 2012, om 09:33 heeft Smatt het volgende geschreven:
>
> > I've been researching syslog (syslogd, klogd, syslog-ng) to turn on logging functionality on the Beaglebone. I couldn't find very good documentation. After a lot of research, I found that this is all handled through systemd journaling. The problem I have is, when I create the /var/log/journal directory to persist the journal files, I see the following problems:
> > 1. systemd-journalctl does not appear to work properly (does not show all log contents). If I delete /var/log/journal, then there is no problem
> > 2. systemd-journalctl --follow fails with "Failed to iterate through journal: Cannot allocate memory". I believe this is due to a bug in systemd-journalctl when persisting the journal.
> >
> > Can anyone tell me if they have successfully used journaling with systemd for application/system level logging? Have you persisted the log files and handled log rotation?
>
> Are you using the latest software/image?
>
> regards,
>
> Koen
>
> -- To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard...@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq

Smatt

unread,
Jul 11, 2012, 12:06:51 AM7/11/12
to beagl...@googlegroups.com
Confirmed the v44-45 systemd fixed the persistence issue.  I can read the entire log history using journalctl (not systemd-journalctl).  
Why aren't these newer images posted to the Angstom Beagleboard page?  I wanted to use a stock img for baseline testing and development, but it looks like the Angstrom stock images are not being kept up-to-date for the Beagleboard.  

Koen Kooi

unread,
Jul 11, 2012, 1:32:11 AM7/11/12
to beagl...@googlegroups.com

Op 11 jul. 2012, om 06:06 heeft Smatt het volgende geschreven:

> Confirmed the v44-45 systemd fixed the persistence issue. I can read the entire log history using journalctl (not systemd-journalctl).
> Why aren't these newer images posted to the Angstom Beagleboard page? I wanted to use a stock img for baseline testing and development, but it looks like the Angstrom stock images are not being kept up-to-date for the Beagleboard.

They are being kept up to date, but on the angstrom website:

http://downloads.angstrom-distribution.org/demo/beagleboard/
http://downloads.angstrom-distribution.org/demo/beaglebone/

Smatt

unread,
Jul 12, 2012, 3:11:01 AM7/12/12
to beagl...@googlegroups.com
Koen,
Thought I would let you that I installed the img from your link below, but after installing the eth0 interface wouldn't work.  ifup/down wouldn't work.  Unplugging and replugging the cable did nothing.  I found some posts on the A4 board with a similar problem that was around a hardware issue.  Considering I'm running A5, I wouldn't think this would apply though.  

I decided to download the img from  http://downloads.angstrom-distribution.org/demo/beaglebone/ , which is dated 2012.06.18 (yours was 2012.07.06) and the problem went away.  Just an FYI.

Matt
Reply all
Reply to author
Forward
0 new messages