3 ms·
I like some parts systemd does but binary format is travesty. And I do not mean "the fact it is binary is bad" but format itself. Example: strace systemctl
by ilyt 4y ago
I like some parts systemd does but binary format is travesty. And I do not mean "the fact it is binary is bad" but format itself. Example:
strace systemctl status haproxy 2>&1 |grep /var/log/journal |wc -l
356
356 files opened (whole logging dir is around 800MB) only to tell me
CGroup: /system.slice/haproxy.service
├─2428 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock
└─2434 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock
Warning: journal has been rotated since unit was started, output may be incomplete.
Yes, to tell me there are no logs for the app. And it takes multiple seconds (I tested it on NAS with spinning rust).
because it opens ALL of the logfiles
% /var/log/journal1 find . |wc -l
356
The bug has 6 years https://github.com/systemd/systemd/issues/2460 https://github.com/systemd/systemd/issues/2460
If it was just "a SQLite database on some sensible rotation" + maybe pointer-per-app showing where app last logged I'd actually be thrilled.
Whole system logs instantly queryable by SQL queries ? Sign me in! Hell, while we're at it slap structured logging there (say if app opts in for it).
But this abomination is an utter waste of time.
- nine_k 4y agoFortunately binary logging can be switched off and redirected to syslog on hosts where have control but can't replace the init system. https://wiki.archlinux.org/title/Systemd/Journal#Journald_in_conjunction_with_syslog https://wiki.archlinux.org/title/Systemd/Journal#Journald_in...
- throw0101c 4y ago> Fortunately binary logging can be switched off This is not switching them off. It is having the binary logs mirrored to text logs: > […] by letting systemd forward all messages via the socket /run/systemd/journal/syslog. So now you have two copies of the same information.
- theamk 4y agoYou use it with Storage=none, which turns off binary logging format