[systemd-devel] [PATCH] journald: check if socket is in connected state before forwarding to syslog
Umut Tezduyar Lindskog
umut at tezduyar.com
Mon Jul 21 05:15:42 PDT 2014
On Mon, Jul 21, 2014 at 1:04 PM, Piotr Wilczek <p.wilczek at samsung.com> wrote:
> On 07/11/2014 01:16 PM, Lennart Poettering wrote:
>>
>> On Fri, 11.07.14 13:02, Piotr Wilczek (p.wilczek at samsung.com) wrote:
>>
>>>> B) Now, as a shortcut we use the same sock actually, via sendto() to
>>>> also pass data to /run/systemd/journal/syslog, which is where a
>>>> secondary syslog server should listen on, which will then also receieve
>>>> the data. THis one is likely to fail, because journald starts very
>>>> early, and syslog daemons start very late, hence for the initial time
>>>> no message can be delivered at all. Moreover, in many setups there is
>>>> no secondary syslog, so this will fail each and every single time, but
>>>> that's intended really.
>>>>
>>>> Now, your patch apparently looks for errors wth step A), and you argue
>>>> you want to get rid of CPU load of B), which I can't follow. Since A
>>>> and B are actually kinda separate they just happen to use the same
>>>> socket, because that was easier...
>>>>
>>>
>>> The CPU load is higher becouse now messages are sent to a socket that is
>>> not
>>> in a connected state. I wanted to avoid that with the present
>>> configuration.
>>
>>
>> Hmm? Why does that create higher CPU load, and also what does "connected
>> state" mean event? It's a SOCK_DGRAM socket, and your code changed the
>> listening bit, event though you say the sending bit is the one that
>> costs?
>>
>> Still not grokking at wall what you want to do...
>>
>
> The CPU usage is to prepare, send and (maybe) handle sending error. All
> unnecessary because we (and apparently others) don't need it.
> I wanted to automatically disable it on error but in wrong way so scratch
> it.
>
> It would be the best to disable forwarding to syslog by default.
http://cgit.freedesktop.org/systemd/systemd/commit/?id=46b131574fdd7d77c15a0919ca9010cad7aa6ac7
Umut
>
> Piotr
>
>> Lennart
>>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list