[systemd-devel] syslog.socket vs. syslog.service

enaut enaut.w at googlemail.com
Fri Dec 3 08:11:27 PST 2010


  On 03.12.2010 14:19, Marius Tolzmann wrote:
>
> hi..
>
> i have configured a syslog.service which works well..
>
> but the syslog.socket which activated systemd-kmsg-syslog.service is 
> still active and running.. the socket does not activate the service 
> anymore but it is still listed as listening..
The socket just creates the socket and programms can write to it... so 
it is kind of listening.

If then later on syslog.service is started it ideally should just take 
the existing socket and read all messages written so far. So you get all 
the messages since the creation of the socket, but you do not have to 
bother starting the actual daemon in this early stage.
>
> how is this supposed to be configured correctly.. since i think i need 
> the systemd-kmsg-syslog as long as my syslog.service ist not running 
> and able to write its logfiles to the filesystem.. ??
If I understood correctly the kmsg-syslog thing just gets all the 
messages from kmsg and puts them into the syslog socket /dev/log but not 
sure about that.
> but how do i get rid of this socket activated /dev/log handling and 
> replace it with my syslog.service completely?
Actually I think its not socket activated. It's just that the socket is 
created before starting the actual daemon. (socket activation would mean 
that the deamon is only started on traffic through that socket). In our 
case syslog.service is always started if multi-user.target is started.
>
> i am confused... ...again 8)
>
> thanks @all for the links to all the systemd unit repositories..
> -> why is it that all *syslog*.service files are WantedBy 
> multi-user.target and not let's say WantedBy basic.target?
Well all the messages are cached in the socket. So no harm in starting 
it late!

enaut

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20101203/1808e41d/attachment.htm>


More information about the systemd-devel mailing list