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

From: Guillaume Thouvenin
Date: Wed Feb 23 2005 - 02:32:07 EST


On Tue, 2005-02-22 at 12:11 -0800, Jay Lan wrote:
> How ELSA adds per process accounting data
> to your grouping (banks) when a process exit? How do you save
> accounting data you need in task_struct before it is disposed? BSD
> handles that through acct_process() hook at do_exit(). CSA also
> depends on a hook at do_exit() to merge per-process data to per-job
> data. How does ELSA handle this without a need of a do_exit() hook?

There are three parts in ELSA.

There is a job daemon that does process aggregation. It needs a hook
in the do_fork() routine to be able to manage group of processes. So
this part handles process-aggregation by maintaining a complete picture
of the process/thread hierarchy.

You can interact with the job daemon with classical IPC and message
operations. Thus we wrote a second part that is the interface between
the user and the job daemon. Through this interface you can add and
remove a process in/from a group, you can stop the job daemon and you
can dump information in a file about current group of processes.

This file (that contains information about group of processes) is used
by ELSA, with the accounting file provided by the accton(8) command and
the BSD accounting, to provide per-group of process accounting. So the
third part of ELSA is a parser and also an analyzer.

The architecture of ELSA is as follow (I hope that the ASCII picture
will be readable):


KERNEL | USER SPACE
|
------------------- | ---------------
| 1. Fork connector | Netlink | 2. Job Daemon |
| |---------->| |
------------------- | ---------------
| ^
| | IPC -----------------
| ---->| 3. Interface |
| | (webmin, ...) |---
| --->| | |
| | ----------------- |
| Per-group of
Accounting File processes
(see accton(8)) accounting


You can see how it works on the following web page:
http://elsa.sourceforge.net/sample_session.html
In the session we're using the fork_history.ko which will be replace by
the fork hook connector.

Best regards,
Guillaume


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/