Gentoo Archives: gentoo-user

From: "Yuri K. Shatroff" <yks-uno@××××××.ru>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie
Date: Thu, 20 Feb 2014 09:17:04
Message-Id: 5305C7E3.9030906@yandex.ru
In Reply to: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie by "Canek Peláez Valdés"
1 20.02.2014 09:24, Canek Peláez Valdés пишет:
2 > [ snip ]
3 >> but I do not see the point, beyond as a nice gimmick.
4 >
5 > Well, I *do* see a point. Many points, actually. You want the logs for
6 > SSH, from February 12 to February 15? Done:
7 >
8 > journalctl --since=2014-02-12 --until=2014-02-15 -u sshd.service
9 >
10 > No grep. No cat. No hunting logrotated logs (the journal will rotate
11 > automatically its logs, and will search on all logs available). You
12 > can have second-precision intervals.
13 >
14 > Also, the binary format that the journal uses is indexed (hence the
15 > binary part); therefore, the search is O(log n), no O(n). With a log
16 > with a million entries, that's about 20 steps.
17 >
18 > Perhaps it's just a gimmick to you. For me is a really usefull
19
20 Clearly, it's reinventing a wheel. All that indexing stuff and O(log(n))
21 if really needed is easily achieved with databases.
22 Not using cat and grep is not something one'd boast; rather, again, a
23 waste of resources to recreate already existing tools.
24 BTW, I wonder if anyone does really have logs with millions of lines in
25 one single file, not split into files by date, service etc, so that the
26 whole O(n) issue is moot.
27 Well, maybe it'd be nice to have a collection of log management tools
28 all-in-one but beyond that I don't see any advantages of systemd-journald.
29
30 > Its raison d'être is the new features it brings.
31
32 I didn't notice any new features. It's not features that are new, but
33 just a new implementation of old features in a more obtrusive way IMO.
34
35 >> Additionally, the use of "tail -f" and "grep" allows me to check the logs
36 >> real-time for debugging purposes.
37 >
38 > journalctl -f
39 >
40 > Checks the logs in real time. Again, [1].
41
42 Again, a brand new Wheel(c)
43
44 > systemctl status apache2.service
45 >
46 > (see [2]) will print the status of the Apache web server, and also the
47 > last lines from the logs. You can control how many lines. You can
48 > check also with the journal, as I showed up.
49
50 I believe it would be a 5-minutes job to add the capability of printing
51 last N log entries for a service to `rc-service status`. Using cat, grep
52 and the like. Not reinventing wheels. Not spending super-talented
53 super-highly paid developers' time on doing tasks one had done about 30
54 years ago. I believe, not having this option is due to its simple
55 uselessness.
56
57 This way I really wonder if at some point the super talented systemd
58 programmers decide that all shell tools are obsolete and every program
59 should know how to index or filter or tail its output in its own,
60 though, open, binary format. I can't get rid of the idea that systemd
61 uses the MS Windows approach whatever you say about its open source.
62
63 --
64 Regards,
65 Yuri K. Shatroff

Replies