Re: [Lse-tech] Re: A common layer for Accounting packages

Andrew Morton
2005-02-23T08:52:48Z

Guillaume Thouvenin <guillaume.thouvenin@bull.net> wrote:
>
> ...
>
> > We really want to avoid doing such stuff in-kernel if at all possible, of
> > course.
> >
> > Is it not possible to implement the fork/exec/exit notifications to
> > userspace so that a daemon can track the process relationships and perform
> > aggregation based upon individual tasks' accounting? That's what one of
> > the accounting systems is proposing doing, I believe.
>
> It's what I'm proposing. The problem is to be alerted when a new process
> is created in order to add it in the correct group of processes if the
> parent belongs to one (or several) groups. The notification can be done
> with the fork connector patch.

Yes, it sounds sane.

The 2.6.8.1 ELSA patch adds quite a bit of kernel code, but from what
you're saying it seems like most of that has become redundant, and all
you now need is the fork notifier. Is that correct?

That 2.6.8.1 ELSA patch looks reasonable to me - it only adds two lines to
generic code and the rest looks pretty straightforward. Are we sure that
this level of functionality is not sufficient for everyone else?

> > (In fact, why do we even need the notifications? /bin/ps can work this
> > stuff out).
>
> Yes it can but the risk is to lose some forks no?
> I think that /bin/ps is using the /proc interface. If we're polling
> the /proc to catch process creation we may lost some of them. With the
> fork connector we catch all forks and we can check that by using the
> sequence number (incremented by each fork) of the message.

Oh, I wasn't proposing that it all be done via existing /proc interfaces -
I was just getting my head straight ;)