diff --git a/doc/man1/flux-account-create-db.rst b/doc/man1/flux-account-create-db.rst new file mode 100644 index 00000000..39392a1c --- /dev/null +++ b/doc/man1/flux-account-create-db.rst @@ -0,0 +1,30 @@ +.. flux-help-section: flux account + +========================= +flux-account-create-db(1) +========================= + + +SYNOPSIS +======== + +**flux** **account** **create-db** [OPTIONS] + +DESCRIPTION +=========== + +.. program:: flux account create-db + +:program:`flux account create-db` creates the flux-accounting SQLite database +which will hold all of the accounting information for users, banks, queues, +projects, and job records. + +.. option:: --priority-usage-reset-period + + The number of weeks at which job usage information gets reset to 0. By + default, the usage reset period is set at 4 weeks. + +.. option:: --priority-decay-half-life + + The contribution of historical usage in weeks on the composite job usage + value. By default, this is set at 1 week. diff --git a/doc/man1/flux-account-export-db.rst b/doc/man1/flux-account-export-db.rst new file mode 100644 index 00000000..48295793 --- /dev/null +++ b/doc/man1/flux-account-export-db.rst @@ -0,0 +1,38 @@ +.. flux-help-section: flux account + +========================= +flux-account-export-db(1) +========================= + + +SYNOPSIS +======== + +**flux** **account** **export-db** [OPTIONS] + +DESCRIPTION +=========== + +.. program:: flux account export-db + +:program:`flux account export-db` will extract flux-accounting database +information into two ``.csv`` files. + +.. option:: -u, --users + + Path to a ``.csv`` file containing user information. + +.. option:: -b, --banks + + Path to a ``.csv`` file containing bank information. + +The order of columns extracted from the ``association_table``: + +**Username,UserID,Bank,Shares,MaxRunningJobs,MaxActiveJobs,MaxNodes,Queues** + +The order of columns extracted from the ``bank_table``: + +**Bank,ParentBank,Shares** + +If no custom path is specified, this will create a file in the current working +directory called ``users.csv`` and ``banks.csv``. diff --git a/doc/man1/flux-account-pop-db.rst b/doc/man1/flux-account-pop-db.rst new file mode 100644 index 00000000..f7154432 --- /dev/null +++ b/doc/man1/flux-account-pop-db.rst @@ -0,0 +1,42 @@ +.. flux-help-section: flux account + +====================== +flux-account-pop-db(1) +====================== + + +SYNOPSIS +======== + +**flux** **account** **pop-db** [OPTIONS] + +DESCRIPTION +=========== + +.. program:: flux account pop-db + +:program:`flux account pop-db` will populate an already-existing +flux-accounting database with a ``.csv`` file. + +.. option:: -u, --users + + Path to a ``.csv`` file containing user information. + +.. option:: -b, --banks + + Path to a ``.csv`` file containing bank information. + +The order of elements required for populating the ``association_table`` are as +follows: + +**Username,UserID,Bank,Shares,MaxRunningJobs,MaxActiveJobs,MaxNodes,Queues** + +**Shares,MaxRunningJobs,MaxActiveJobs,MaxNodes** can be left blank (``''``) in +the ``.csv`` file for a given row. + +The order of elements required for populating the ``bank_table`` are as +follows: + +**Bank,ParentBank,Shares** + +**Shares** can be left blank (``''``) in the ``.csv`` file for a given row. diff --git a/doc/man1/flux-account.rst b/doc/man1/flux-account.rst new file mode 100644 index 00000000..3f8c8ea0 --- /dev/null +++ b/doc/man1/flux-account.rst @@ -0,0 +1,121 @@ +.. flux-help-section: flux account + +=============== +flux-account(1) +=============== + + +SYNOPSIS +======== + +**flux** **account** [*COMMAND*] [OPTIONS] + +DESCRIPTION +=========== + +.. program:: flux account + +:program:`flux account` provides an interface to the SQLite database containing +information regarding banks, associations, queues, projects, and archived jobs. +It also provides administrative commands like exporting and populating the DB's +information to and from ``.csv`` files, updating the database when new versions +of flux-accounting are released, and more. + +DATABASE ADMINISTRATION +======================= + +create-db +^^^^^^^^^ + +Create the flux-accounting database. + +See flux account-create-db(1) for more details. + +pop-db +^^^^^^ + +Populate a flux-accounting database with ``.csv`` files. + +See flux account-pop-db(1) for more details. + +export-db +^^^^^^^^^ + +Export a flux-accounting database into ``.csv`` files. + +See flux account-export-db(1) for more details. + +USER ADMINISTRATION +=================== + +view-user +^^^^^^^^^ + +add-user +^^^^^^^^ + +delete-user +^^^^^^^^^^^ + +edit-user +^^^^^^^^^ + +BANK ADMINISTRATION +=================== + +view-bank +^^^^^^^^^ + +add-bank +^^^^^^^^ + +delete-bank +^^^^^^^^^^^ + +edit-bank +^^^^^^^^^ + +list-banks +^^^^^^^^^^ + +QUEUE ADMINISTRATION +==================== + +view-queue +^^^^^^^^^^ + +add-queue +^^^^^^^^^ + +delete-queue +^^^^^^^^^^^^ + +edit-queue +^^^^^^^^^^ + +PROJECT ADMINISTRATION +====================== + +view-project +^^^^^^^^^^^^ + +add-project +^^^^^^^^^^^ + +delete-project +^^^^^^^^^^^^^^ + +list-projects +^^^^^^^^^^^^^ + +JOB RECORDS +=========== + +view-job-records +^^^^^^^^^^^^^^^^ + +update-usage +^^^^^^^^^^^^ + +scrub-old-jobs +^^^^^^^^^^^^^^ diff --git a/doc/manpages.py b/doc/manpages.py index bcfbc573..cdc9c1df 100644 --- a/doc/manpages.py +++ b/doc/manpages.py @@ -17,6 +17,34 @@ # - Author (use [author]) # - Manual section man_pages = [ + ( + "man1/flux-account", + "flux-account", + "flux-accounting commands", + [author], + 1, + ), + ( + "man1/flux-account-create-db", + "flux-account-create-db", + "create the flux-accounting SQLite database", + [author], + 1, + ), + ( + "man1/flux-account-pop-db", + "flux-account-pop-db", + "populate a flux-accounting database with .csv files", + [author], + 1, + ), + ( + "man1/flux-account-export-db", + "flux-account-export-db", + "export flux-accounting database information into .csv files", + [author], + 1, + ), ( "man5/flux-config-accounting", "flux-config-accounting", diff --git a/doc/test/spell.en.pws b/doc/test/spell.en.pws index 22176b31..e5e8ab57 100644 --- a/doc/test/spell.en.pws +++ b/doc/test/spell.en.pws @@ -536,3 +536,11 @@ raiseall fairshare dne DNE +csv +SQLite +DB's +MaxActiveJobs +MaxNodes +MaxRunningJobs +ParentBank +UserID