                            ==============
                            HOW TO USE IT?
                            ==============

0) Test your system
-------------------

    You can test if connectors are available on your system by using the 
    C program provided by Evgeniy Polyakov cn_test.c. This program is 
    distributed with Linux. Look under Linux-source/Documentation/connector/
    
    There is also a script that tests if BSD v3 is installed and if it is, 
    it tests if 'jobmng' is working well. The script can be found in 
    /usr/share/doc/elsa-x.y.z/

    The webmin module is not distributed with ELSA. It can be downloaded at 
    http://elsa.sf.net

1) Start the job daemon
-----------------------

    The job daemon is started from a console and you must have root
    privileges:

        # sudo /sbin/jobd

2) Start per-process accounting
-------------------------------

    You can enable the per-process accounting through the webmin interface
    or you can start the BSD accounting with accounting scripts. For
    example on a Fedora Core 5:

        # sudo /etc/init.d/psacct start

    You can also the command ACCTON(8) to turn process accounting on or off but
    in this case you need to give an accounting file as parameter. 
    

3) Let's play with accounting
-----------------------------

    Now everything is set to use ELSA. To add/remove a process in a group
    of processes you use the script 'jobmng' provided by ELSA. For the
    analysis you can use the script 'elsa' or you can use the webmin interface.
    You don't need root privilege to achieve this. Here is an example of what
    can be done:

    -> Run a command and add it in a group of processes:
        # jobmng -a -e ls
        This executes the command 'ls' and adds it in a new group of processes.
        After the execution, a new job (job #1 if it's the first usage) is
        created and it contains 'ls'.

    -> Run another command in the same job:
        # jobmng -a -e date -j 1
        This executes the command 'date' and adds it in the job #1.

    -> Add the process 1234 in a new job:
        # jobmng -a -p 1234
        Process 1234 is added in a new job (#2). It means that all its children
        will belong to job #2.

    -> Now to see the results you need to gather information about group of
       process. 
        # jobmng -d > jobresults.tmp

       And now just with the script 'elsa'

        # elsa -x -a /var/account/pacct -j jobresults.tmp

       If you use ACCTON or another distribution, the name of the accounting 
       file will be different. You can also see results of the command with 
       the webmin interface. If you have a message "ERROR during analysis" you
       can check if your system is compatible with ELSA. It is compatible if it
       uses BSD Accounting Version 3 and if connectors are available.



Enjoy,
The ELSA Team
