Skip to content

Commit

Permalink
doc: update job-archive notes
Browse files Browse the repository at this point in the history
Problem: The Accounting Guide does not detail instructions for the new
job archival method in flux-accounting.

Update the flux-accounting guide with the new instructions on setting up
the new Python script that fetches inactive jobs and stores them in the
flux-accounting DB to be used for job usage and fair share calculation.

Update the code block that shows which commands to set up with
flux-cron.

Update the list of tables present in the flux-accounting database to
account for the new "jobs" table.
  • Loading branch information
cmoussa1 committed May 10, 2024
1 parent 0bb3437 commit 98e92c2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions doc/guide/accounting-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ bank allocations.
The database is populated and queried with command line tools prefixed with
``flux account``. Accounting scripts are run regularly by
:core:man1:`flux-cron` to pull historical job information from the Flux
``job-archive`` database to the accounting database, and to push bank and limit
data to the jobtap plugin.
``job-list`` and ``job-info`` interfaces into the accounting database,
and to push bank and limit data to the jobtap plugin.

At this time, the database is expected to be installed on a cluster management
node, co-located with the rank 0 Flux broker, managing accounts for that
Expand Down Expand Up @@ -144,6 +144,8 @@ following command:
A series of actions should run periodically to keep the accounting
system in sync with Flux:

- A script fetches inactive jobs and inserts them into a ``jobs`` table in the
flux-accounting DB.
- The job-archive module scans inactive jobs and dumps them to a sqlite
database.
- A script reads the archive database and updates the job usage data in the
Expand All @@ -167,7 +169,7 @@ The scripts should be run by :core:man1:`flux-cron`:
# /etc/flux/system/cron.d/accounting
30 * * * * bash -c "flux account update-usage --job-archive_db_path=/var/lib/flux/job-archive.sqlite; flux account-update-fshare; flux account-priority-update"
30 * * * * bash -c "flux account-fetch-job-records; flux account update-usage; flux account-update-fshare; flux account-priority-update"
***********************
Database Administration
Expand Down Expand Up @@ -216,6 +218,9 @@ consists of the following tables:
| project_table | stores projects for associations to charge their |
| | jobs against |
+--------------------------+--------------------------------------------------+
| jobs | stores inactive jobs for job usage and fair |
| | share calculation |
+--------------------------+--------------------------------------------------+

To view all associations in a flux-accounting database, the ``flux
account-shares`` command will print this DB information in a hierarchical
Expand Down

0 comments on commit 98e92c2

Please sign in to comment.