Re: [gentoo-user] Questions about systemd logging

2013-01-12 Thread Robin Atwood
On Friday 11 January 2013, Canek Peláez Valdés wrote:
 On Thu, Jan 10, 2013 at 10:46 AM, Robin Atwood
 
 robin.atw...@attglobal.net wrote:
  On Thursday 10 January 2013, Canek Peláez Valdés wrote:
  On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood
  robin.atw...@attglobal.net
  
  wrote:
 
 Stupid question, the syslog-ng.service is running correctly? What does
 the following command say:
 
 systemctl status syslog-ng.service

Syslog-ng is running fine, I get all my normal logging, just none from 
systemd. If I can get I don't have to mess around with journalctl.

-Robin

-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--










Re: [Bulk] Re: [gentoo-user] Questions about systemd logging

2013-01-12 Thread Robin Atwood
On Friday 11 January 2013, Kevin Chadwick wrote:
 On Thu, 10 Jan 2013 23:46:29 +0700
 
 Robin Atwood robin.atw...@attglobal.net wrote:
  Thanks for the tips, now I can get more output to tty1 if I want. I
  still can't get any systemd messages to syslog-ng, however. A bit of
  a mystery.
 
 This may be way off as I expect systemd to never shape up to a point
 that I will use it, but with a bit of luck this may point you in the
 right direction. On Arch systemd avoiders had to change their
 syslog-ng.conf to the following to get their logging back.
 
 source src {
   unix-dgram(/dev/log);
   internal();
   file(/proc/kmsg);
 };

I already have that! It's the systemd source that seems to have run dry.

Cheers
-Robin
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--










Re: [gentoo-user] Questions about systemd logging

2013-01-12 Thread Canek Peláez Valdés
On Sat, Jan 12, 2013 at 8:31 AM, Robin Atwood
robin.atw...@attglobal.net wrote:
 On Friday 11 January 2013, Canek Peláez Valdés wrote:

 On Thu, Jan 10, 2013 at 10:46 AM, Robin Atwood



 robin.atw...@attglobal.net wrote:

  On Thursday 10 January 2013, Canek Peláez Valdés wrote:

  On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood

  robin.atw...@attglobal.net

 

  wrote:



 Stupid question, the syslog-ng.service is running correctly? What does

 the following command say:



 systemctl status syslog-ng.service



 Syslog-ng is running fine, I get all my normal logging, just none from
 systemd. If I can get I don't have to mess around with journalctl.

What is the value of LogTarget in your /etc/systemd/system.conf?

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] Questions about systemd logging

2013-01-10 Thread Robin Atwood
On Thursday 10 January 2013, Canek Peláez Valdés wrote:
 On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood robin.atw...@attglobal.net 
wrote:
  I have temporarily shelved my problem with mounting since my work-around
  seems adequate. But I have some questions about logging. Journald works
  fine but what am I supposed to see on the main console?
 
 What do you mean by main console? tty1? tty12? /dev/console?
 
  All I can see is a few
  kernel messages which cease after the lvm service completes. There are no
  service starting messages and no login prompt appears. The other ttys
  have a banner and prompt as usual.
 
 systemd by default only spawns 1 (one) tty, tty1:
 
 $ ls /etc/systemd/system/getty.target.wants/
 getty@tty1.service
 
 That's the only login prompt spawned by default. The other virtual
 consoles get spawned automatically if you switch to them. In other
 words, if you never switch to the virtual console 2, there is no login
 prompt there. It will appear until you switch to it. systemd should
 switch to tty1 and launch getty@tty1.service automatically when the
 getty.target is reached in the boot process.
 
 I'm not really sure what the problem is; if you are concerned by the
 [ OK ] messages when booting, it is possible that systemd is so fast
 that you have no chance to see them (that happens in my laptop with a
 solid state harddrive). Also, if you have a splash (like plymouth),
 the whole point of the splash is that you don't see said messages. You
 can see a copy of the boot log in /var/log/boot.log; that it's what
 you are supposed to see when booting, but if you have a splash you
 won't, or maybe it will be so fast that you will miss it.
 
  Secondly I want to merge the journal into syslog-ng for post-processing.
  I have the correct syslog-ng service defined and syslog-ng.conf has been
  modified to use /run/systemd/journald/syslog as a source unix-stream.
  But I see no systemd messages appearing. In the Gentoo package all the
  journald.conf statements are commented out, which ones are necessary to
  do what I want. I have tried the logging_to_syslog/kmsg options but to
  no effect, but there are many!
 
 I switched from syslog-ng to rsyslog around three years ago, and
 exclusively to the journal some months ago, so this is from memory:
 
 1. You need to link your syslog service unit to
 /etc/systemd/system/syslog.service; for example:
 
 /etc/systemd/system/syslog.service -
 /usr/lib/systemd/system/syslog-ng.service
 
 2. You need to set LogTarget=syslog (or LogTarget=syslog-or-kmsg) in
 /etc/systemd/system.conf. You are configuring *systemd* to use a third
 party syslog; you don't need to configure the journal itself.
 
 man 5 systemd.conf
 man 1 systemd
 
 If I recall correctly, that's it. systemd automatically will buffer
 the early boot messages until your preferred syslog service start, and
 from that point on it will send the logs to it immediately.

Thanks for the tips, now I can get more output to tty1 if I want. I still 
can't get any systemd messages to syslog-ng, however. A bit of a mystery. 

Cheers
-Robin
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--










Re: [Bulk] Re: [gentoo-user] Questions about systemd logging

2013-01-10 Thread Kevin Chadwick
On Thu, 10 Jan 2013 23:46:29 +0700
Robin Atwood robin.atw...@attglobal.net wrote:

 Thanks for the tips, now I can get more output to tty1 if I want. I
 still can't get any systemd messages to syslog-ng, however. A bit of
 a mystery. 

This may be way off as I expect systemd to never shape up to a point
that I will use it, but with a bit of luck this may point you in the
right direction. On Arch systemd avoiders had to change their
syslog-ng.conf to the following to get their logging back.

source src {
unix-dgram(/dev/log);
internal();
file(/proc/kmsg);
};



Re: [gentoo-user] Questions about systemd logging

2013-01-10 Thread Canek Peláez Valdés
On Thu, Jan 10, 2013 at 10:46 AM, Robin Atwood
robin.atw...@attglobal.net wrote:
 On Thursday 10 January 2013, Canek Peláez Valdés wrote:

 On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood robin.atw...@attglobal.net
 wrote:

  I have temporarily shelved my problem with mounting since my work-around

  seems adequate. But I have some questions about logging. Journald works

  fine but what am I supposed to see on the main console?



 What do you mean by main console? tty1? tty12? /dev/console?



  All I can see is a few

  kernel messages which cease after the lvm service completes. There are
  no

  service starting messages and no login prompt appears. The other ttys

  have a banner and prompt as usual.



 systemd by default only spawns 1 (one) tty, tty1:



 $ ls /etc/systemd/system/getty.target.wants/

 getty@tty1.service



 That's the only login prompt spawned by default. The other virtual

 consoles get spawned automatically if you switch to them. In other

 words, if you never switch to the virtual console 2, there is no login

 prompt there. It will appear until you switch to it. systemd should

 switch to tty1 and launch getty@tty1.service automatically when the

 getty.target is reached in the boot process.



 I'm not really sure what the problem is; if you are concerned by the

 [ OK ] messages when booting, it is possible that systemd is so fast

 that you have no chance to see them (that happens in my laptop with a

 solid state harddrive). Also, if you have a splash (like plymouth),

 the whole point of the splash is that you don't see said messages. You

 can see a copy of the boot log in /var/log/boot.log; that it's what

 you are supposed to see when booting, but if you have a splash you

 won't, or maybe it will be so fast that you will miss it.



  Secondly I want to merge the journal into syslog-ng for post-processing.

  I have the correct syslog-ng service defined and syslog-ng.conf has been

  modified to use /run/systemd/journald/syslog as a source unix-stream.

  But I see no systemd messages appearing. In the Gentoo package all the

  journald.conf statements are commented out, which ones are necessary to

  do what I want. I have tried the logging_to_syslog/kmsg options but to

  no effect, but there are many!



 I switched from syslog-ng to rsyslog around three years ago, and

 exclusively to the journal some months ago, so this is from memory:



 1. You need to link your syslog service unit to

 /etc/systemd/system/syslog.service; for example:



 /etc/systemd/system/syslog.service -

 /usr/lib/systemd/system/syslog-ng.service



 2. You need to set LogTarget=syslog (or LogTarget=syslog-or-kmsg) in

 /etc/systemd/system.conf. You are configuring *systemd* to use a third

 party syslog; you don't need to configure the journal itself.



 man 5 systemd.conf

 man 1 systemd



 If I recall correctly, that's it. systemd automatically will buffer

 the early boot messages until your preferred syslog service start, and

 from that point on it will send the logs to it immediately.



 Thanks for the tips, now I can get more output to tty1 if I want. I still
 can't get any systemd messages to syslog-ng, however. A bit of a mystery.

Stupid question, the syslog-ng.service is running correctly? What does
the following command say:

systemctl status syslog-ng.service

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] Questions about systemd logging

2013-01-09 Thread Canek Peláez Valdés
On Wed, Jan 9, 2013 at 5:12 AM, Robin Atwood robin.atw...@attglobal.net wrote:
 I have temporarily shelved my problem with mounting since my work-around
 seems adequate. But I have some questions about logging. Journald works fine
 but what am I supposed to see on the main console?

What do you mean by main console? tty1? tty12? /dev/console?

 All I can see is a few
 kernel messages which cease after the lvm service completes. There are no
 service starting messages and no login prompt appears. The other ttys have a
 banner and prompt as usual.

systemd by default only spawns 1 (one) tty, tty1:

$ ls /etc/systemd/system/getty.target.wants/
getty@tty1.service

That's the only login prompt spawned by default. The other virtual
consoles get spawned automatically if you switch to them. In other
words, if you never switch to the virtual console 2, there is no login
prompt there. It will appear until you switch to it. systemd should
switch to tty1 and launch getty@tty1.service automatically when the
getty.target is reached in the boot process.

I'm not really sure what the problem is; if you are concerned by the
[ OK ] messages when booting, it is possible that systemd is so fast
that you have no chance to see them (that happens in my laptop with a
solid state harddrive). Also, if you have a splash (like plymouth),
the whole point of the splash is that you don't see said messages. You
can see a copy of the boot log in /var/log/boot.log; that it's what
you are supposed to see when booting, but if you have a splash you
won't, or maybe it will be so fast that you will miss it.

 Secondly I want to merge the journal into syslog-ng for post-processing. I
 have the correct syslog-ng service defined and syslog-ng.conf has been
 modified to use /run/systemd/journald/syslog as a source unix-stream. But I
 see no systemd messages appearing. In the Gentoo package all the
 journald.conf statements are commented out, which ones are necessary to do
 what I want. I have tried the logging_to_syslog/kmsg options but to no
 effect, but there are many!

I switched from syslog-ng to rsyslog around three years ago, and
exclusively to the journal some months ago, so this is from memory:

1. You need to link your syslog service unit to
/etc/systemd/system/syslog.service; for example:

/etc/systemd/system/syslog.service - /usr/lib/systemd/system/syslog-ng.service

2. You need to set LogTarget=syslog (or LogTarget=syslog-or-kmsg) in
/etc/systemd/system.conf. You are configuring *systemd* to use a third
party syslog; you don't need to configure the journal itself.

man 5 systemd.conf
man 1 systemd

If I recall correctly, that's it. systemd automatically will buffer
the early boot messages until your preferred syslog service start, and
from that point on it will send the logs to it immediately.

Hope it helps.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México