1 |
On Thursday 10 January 2013, Canek Peláez Valdés wrote: |
2 |
> On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood <robin.atwood@×××××××××.net> |
3 |
wrote: |
4 |
> > I have temporarily shelved my problem with mounting since my work-around |
5 |
> > seems adequate. But I have some questions about logging. Journald works |
6 |
> > fine but what am I supposed to see on the main console? |
7 |
> |
8 |
> What do you mean by "main console"? tty1? tty12? /dev/console? |
9 |
> |
10 |
> > All I can see is a few |
11 |
> > kernel messages which cease after the lvm service completes. There are no |
12 |
> > service starting messages and no login prompt appears. The other ttys |
13 |
> > have a banner and prompt as usual. |
14 |
> |
15 |
> systemd by default only spawns 1 (one) tty, tty1: |
16 |
> |
17 |
> $ ls /etc/systemd/system/getty.target.wants/ |
18 |
> getty@××××.service |
19 |
> |
20 |
> That's the only login prompt spawned by default. The other virtual |
21 |
> consoles get spawned automatically if you switch to them. In other |
22 |
> words, if you never switch to the virtual console 2, there is no login |
23 |
> prompt there. It will appear until you switch to it. systemd should |
24 |
> switch to tty1 and launch getty@××××.service automatically when the |
25 |
> getty.target is reached in the boot process. |
26 |
> |
27 |
> I'm not really sure what the problem is; if you are concerned by the |
28 |
> "[ OK ]" messages when booting, it is possible that systemd is so fast |
29 |
> that you have no chance to see them (that happens in my laptop with a |
30 |
> solid state harddrive). Also, if you have a splash (like plymouth), |
31 |
> the whole point of the splash is that you don't see said messages. You |
32 |
> can see a copy of the "boot log" in /var/log/boot.log; that it's what |
33 |
> you are supposed to see when booting, but if you have a splash you |
34 |
> won't, or maybe it will be so fast that you will miss it. |
35 |
> |
36 |
> > Secondly I want to merge the journal into syslog-ng for post-processing. |
37 |
> > I have the correct syslog-ng service defined and syslog-ng.conf has been |
38 |
> > modified to use /run/systemd/journald/syslog as a source unix-stream. |
39 |
> > But I see no systemd messages appearing. In the Gentoo package all the |
40 |
> > journald.conf statements are commented out, which ones are necessary to |
41 |
> > do what I want. I have tried the "logging_to_syslog/kmsg" options but to |
42 |
> > no effect, but there are many! |
43 |
> |
44 |
> I switched from syslog-ng to rsyslog around three years ago, and |
45 |
> exclusively to the journal some months ago, so this is from memory: |
46 |
> |
47 |
> 1. You need to link your syslog service unit to |
48 |
> /etc/systemd/system/syslog.service; for example: |
49 |
> |
50 |
> /etc/systemd/system/syslog.service -> |
51 |
> /usr/lib/systemd/system/syslog-ng.service |
52 |
> |
53 |
> 2. You need to set LogTarget=syslog (or LogTarget=syslog-or-kmsg) in |
54 |
> /etc/systemd/system.conf. You are configuring *systemd* to use a third |
55 |
> party syslog; you don't need to configure the journal itself. |
56 |
> |
57 |
> man 5 systemd.conf |
58 |
> man 1 systemd |
59 |
> |
60 |
> If I recall correctly, that's it. systemd automatically will buffer |
61 |
> the early boot messages until your preferred syslog service start, and |
62 |
> from that point on it will send the logs to it immediately. |
63 |
|
64 |
Thanks for the tips, now I can get more output to tty1 if I want. I still |
65 |
can't get any systemd messages to syslog-ng, however. A bit of a mystery. |
66 |
|
67 |
Cheers |
68 |
-Robin |
69 |
-- |
70 |
---------------------------------------------------------------------- |
71 |
Robin Atwood. |
72 |
|
73 |
"Ship me somewheres east of Suez, where the best is like the worst, |
74 |
Where there ain't no Ten Commandments an' a man can raise a thirst" |
75 |
from "Mandalay" by Rudyard Kipling |
76 |
---------------------------------------------------------------------- |