Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
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 05:24:30
Message-Id: CADPrc82ojxGtqAB9jcWOzut8XTFeb0qBh+yHzngp=i0=QMZrng@mail.gmail.com
In Reply to: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie by "J. Roeleveld"
1 On Wed, Feb 19, 2014 at 2:50 AM, J. Roeleveld <joost@××××××××.org> wrote:
2 > On Tue, February 18, 2014 15:37, Canek Peláez Valdés wrote:
3 >> On Tue, Feb 18, 2014 at 3:54 AM, J. Roeleveld <joost@××××××××.org> wrote:
4 >>> As I do not have systemd installed on any machine, I can't check the
5 >>> man-pages.
6 >>
7 >> They are online [1].
8 >
9 > Useful, but not necessary for this discussion.
10
11 It was just a pointer.
12
13 > I see this option as a easter-egg without any real value. How many of
14 > these useless code-paths are implemented?
15 > Can these be disabled at compile time?
16
17 That's neither here nor there; you said "I would expect an export
18 option providing the same detail level as I currently find in
19 /var/log/messages. A timestamp is a minimum required for logging
20 system output."; I proved to you that the journal shows timestamps and
21 much more, if so desired.
22
23 [ snip ]
24 >> See if you can easily do that with rsyslog or syslog-ng.
25 >
26 > Not easily,
27
28 That's (one of) the advantage(s) that the journal brings. BTW, I'm not
29 trying to convince anyone to use the journal (nor systemd); I'm just
30 pointing out about features.
31
32 > but I do not see the point, beyond as a nice gimmick.
33
34 Well, I *do* see a point. Many points, actually. You want the logs for
35 SSH, from February 12 to February 15? Done:
36
37 journalctl --since=2014-02-12 --until=2014-02-15 -u sshd.service
38
39 No grep. No cat. No hunting logrotated logs (the journal will rotate
40 automatically its logs, and will search on all logs available). You
41 can have second-precision intervals.
42
43 Also, the binary format that the journal uses is indexed (hence the
44 binary part); therefore, the search is O(log n), no O(n). With a log
45 with a million entries, that's about 20 steps.
46
47 Perhaps it's just a gimmick to you. For me is a really usefull
48
49 > Same question applies, can I disable these code-paths during compile-time?
50
51 No you can't; if you wanted the journal to work exactly as rsyslog (or
52 syslog-ng), then there is no reason to use the journal. Its raison
53 d'être is the new features it brings.
54
55 If you don't want those features, don't use the journal.
56
57 > I have log-parsing scripts that check for unexpected log-entries which
58 > expect syslog-standard logs.
59
60 I used, too. The journal makes most of then unnecessary, and if I want
61 to, it can provide formatting of the logs in the same way that rsyslog
62 (or syslog-ng) does.
63
64 > I do not see the need to have to spend time to change working code to be
65 > able to handle different formats.
66
67 Well, I prefer it when someone does the work for me.
68
69 > Additionally, the use of "tail -f" and "grep" allows me to check the logs
70 > real-time for debugging purposes.
71
72 journalctl -f
73
74 Checks the logs in real time. Again, [1].
75
76 > Having to use a seperate tool that converts some proprietary binary format
77 > to human readable/scriptable single-line logs makes no sense.
78
79 Its not proprietary; the source code is available, you can write your
80 own parser if you want. The binary format is to be able to do O(log n)
81 searches, that's it. It's a performance optimization.
82
83 > It all sounds too much like the MS Windows Event-viewer to me.
84
85 Never used it.
86
87 > Too many events with no usefull logging information (And I am referring to
88 > OS-level messages as to why default services are not starting)
89
90 systemctl status apache2.service
91
92 (see [2]) will print the status of the Apache web server, and also the
93 last lines from the logs. You can control how many lines. You can
94 check also with the journal, as I showed up.
95
96 If you *want* to, everything is online.
97
98 Regards.
99
100 [1] http://www.freedesktop.org/software/systemd/man/journalctl.html
101 [2] http://www.freedesktop.org/software/systemd/man/systemctl.html
102 --
103 Canek Peláez Valdés
104 Posgrado en Ciencia e Ingeniería de la Computación
105 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] Debian just voted in systemd for default init system in jessie "Yuri K. Shatroff" <yks-uno@××××××.ru>
Re: [gentoo-user] Debian just voted in systemd for default init system in jessie "J. Roeleveld" <joost@××××××××.org>