[systemd-devel] [PATCH] journald: collect process data from socket data

Łukasz Stelmach l.stelmach at samsung.com
Tue Jun 3 02:26:31 PDT 2014


It was <2014-05-30 pią 14:13>, when Michal Sekletar wrote:
> On Fri, May 30, 2014 at 12:45:21PM +0200, Piotr Wilczek wrote:
>> This patch adds posibility for journal to get process data from
>> socket data (if available) instead of from procfs.
>> 
>> Additionally a new procinfo structure is added to store all process
>> data in single place. This data include creditentials and status.
>> 
>> To enable this functionality, SO_PASSPROC socket option must be set.
>> This option is introduced in:
>> http://lwn.net/Articles/600564/
>> 
>> With this patch journald cpu usage is decresed by about 20%
>> 
>> Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
>> ---
>
> Thanks for moving this forward! I hope your attempt will go through David's
> review.
>
> I know that flag was suggested by Kay, but isn't there a nicer way how to expose
> this to userspace given that in "man 7 unix" is written following:
>  
>      "For historical reasons these socket options are specified with a
>       SOL_SOCKET type even though  they  are AF_UNIX  specific."
>
> AFAIK we had only SO_PASSCRED and your patchset adds one more.

IMHO there is nothing wrong with SO_PASSPROC being a socket option.
There is no better SOL_ (grep -r define.*SOL_ /usr/include/) than
SOL_SOCKET and I am not sure we need to introducing one now.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140603/2f7655fa/attachment-0001.sig>


More information about the systemd-devel mailing list