[systemd-devel] systemd and kernel process

Steve Dickson SteveD at redhat.com
Thu Oct 1 12:30:02 PDT 2015



On 10/01/2015 09:24 AM, Kay Sievers wrote:
> On Wed, Sep 30, 2015 at 10:49 PM, Steve Dickson <SteveD at redhat.com> wrote:
>> Is there a way for systemd to monitor kernel process?
>> By monitor I mean the existence.
> 
> No, and there is no plan to do anything like that.
> 
> Kernel tasks are kernel internals, and userspace must not make any
> assumptions about them. They can come and go at any time between any
> kernel versions.
> 
> Custom tools can do what they need, but systemd should not offer to do
> that to users.
First all thanks for the response

kernel process in question is nfsd. The number of thread 
is kept in /proc/fs/nfsd/threads. 

So the idea would be doing a systemctl status nfsd 
and number in /proc/fs/nfsd/threads is zero the
service would be deactive. An non-zero number the
service would active. 

Is this something systemd could be used for?

tia,

steved.



More information about the systemd-devel mailing list