Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1176649
| From | Marcin Niesluchowski <m.niesluchow@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 0/8] Additional kmsg devices |
| Date | 2015-07-03 17:10 +0200 |
| Message-ID | <pIaLg-1Di-19@gated-at.bofh.it> (permalink) |
| References | <pI6Rj-7tK-3@gated-at.bofh.it> <pI7kl-7T6-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/03/2015 01:21 PM, Richard Weinberger wrote:
> On Fri, Jul 3, 2015 at 12:49 PM, Marcin Niesluchowski
> <m.niesluchow@samsung.com> wrote:
>> Dear All,
>>
>> This series of patches extends kmsg interface with ability to dynamicaly
>> create (and destroy) kmsg-like devices which can be used by user space
>> for logging. Logging to kernel has number of benefits, including but not
>> limited to - always available, requiring no userspace, automatically
>> rotating and low overhead.
>>
>> User-space logging to kernel cyclic buffers was already successfully used
>> in android logger concept but it had certain flaws that this commits try
>> to address:
>> * drops hardcoded number of devices and static paths in favor for dynamic
>> configuration by ioctl interface in userspace
>> * extends existing driver instead of creating completely new one
> So, now we start moving syslogd into kernel land because userspace is
> too broken to provide
> decent logging?
>
> I can understand the systemd is using kmsg if no other logging service
> is available
> but I really don't think we should encourage other programs to do so.
>
> Why can't you just make sure that your target has a working
> syslogd/rsyslogd/journald/whatever?
> All can be done perfectly fine in userspace.
* Message credibility: Lets imagine simple service which collects logs
via unix sockets. There is no reliable way of identifying logging
process. getsockopt() with SO_PEERCRED option would give pid form cred
structure, but according to manual it may not be of actual logging process:
"The returned credentials are those that were in effect at the time
of the call to connect(2) or socketpair(2)."
- select(7)
* Early userspace tool: Helpful especially for embeded systems.
* Reliability: Userspace service may be killed due to out of memory
(OOM). This is kernel cyclic buffer, which size can be specified
differently according to situation.
* Possibility of using it with pstore: This code could be extended to
log additional buffers to persistent storage same way main (kmsg) log
buffer is.
* Use case of attaching file descriptor to stdout/stderr: Especially in
early userspace.
* Performance: Those services mentioned by You are weeker solutions in
that case. Especially systemd-journald is much too heavy soulution.
--
Best Regards,
Marcin Niesluchowski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/8] Additional kmsg devices Marcin Niesluchowski <m.niesluchow@samsung.com> - 2015-07-03 13:00 +0200
[RFC 4/8] kmsg: add function for adding and deleting additional buffers Marcin Niesluchowski <m.niesluchow@samsung.com> - 2015-07-03 13:00 +0200
[RFC 8/8] kmsg: add ioctl for kmsg* devices operating on buffers Marcin Niesluchowski <m.niesluchow@samsung.com> - 2015-07-03 13:00 +0200
Re: [RFC 0/8] Additional kmsg devices Marcin Niesluchowski <m.niesluchow@samsung.com> - 2015-07-03 17:10 +0200
Re: [RFC 0/8] Additional kmsg devices Andy Lutomirski <luto@amacapital.net> - 2015-07-03 19:00 +0200
Re: [RFC 0/8] Additional kmsg devices Karol Lewandowski <k.lewandowsk@samsung.com> - 2015-07-07 19:20 +0200
csiph-web