diff --git a/doc/man/man1/sacctmgr.1 b/doc/man/man1/sacctmgr.1 index d6874d63a78ffaeeb0861e565c9ab5e5f21510e3..7262d3c00f61d866a2ca008877e3af9befcf6469 100644 --- a/doc/man/man1/sacctmgr.1 +++ b/doc/man/man1/sacctmgr.1 @@ -40,11 +40,23 @@ This is equivalent to the \fBhelp\fR command. Do not display information about hidden or deleted entities. This is equivalent to the \fBhide\fR command. +.TP +\fB\-\-immediate\fR +commit changes immediately. + +.TP +\fB\-n\fR, \fB\-\-no_header\fR +Don't display header when listing results. + .TP \fB\-o\fR, \fB\-\-oneliner\fR Print information one line per record. This is equivalent to the \fBoneliner\fR command. +.TP +\fB\-n\fR, \fB\-\-parsable\fR +Make output '|' delimited. + .TP \fB\-q\fR, \fB\-\-quiet\fR Print no warning or informational messages, only error messages. @@ -65,8 +77,7 @@ This is equivalent to the \fBverbose\fR command. Print version information and exit. This is equivalent to the \fBversion\fR command. -.TP -\fBCOMMANDS\fR +.SH "COMMANDS" .TP \fBall\fR diff --git a/doc/man/man1/sreport.1 b/doc/man/man1/sreport.1 index e67311c9fec92a1a9ef82d517af9f06f70d23860..296931710219b3607c9f70a8cc753d96b9d23183 100644 --- a/doc/man/man1/sreport.1 +++ b/doc/man/man1/sreport.1 @@ -7,29 +7,34 @@ sreport \- Used to generate reports from the slurm accounting data. \fBssreport\fR [\fIOPTIONS\fR...] [\fICOMMAND\fR...] .SH "DESCRIPTION" -\fBssreport\fR is used to generator certain reports. Right now -sreport is a template that does not really do anything. In the future -it will provide a view into accounting data gathered from slurm via +\fBssreport\fR is used to generate certain reports. More can be added +at any time. It provides a view into accounting data gathered from slurm via the account information maintained within a database with the interface -being provided by \fBslurmdbd\fR (Slurm Database daemon). +being provided by the \fBslurmdbd\fR (Slurm Database daemon). .SH "OPTIONS" .TP +\fB\-a\fR, \fB\-\-all_clusters\fR +Use all clusters instead of only cluster from where the command was run. + \fB\-h\fR, \fB\-\-help\fR Print a help message describing the usage of \fBssreport\fR. This is equivalent to the \fBhelp\fR command. .TP -\fB\-o\fR, \fB\-\-oneliner\fR -Print information one line per record. -This is equivalent to the \fBoneliner\fR command. +\fB\-n\fR, \fB\-\-no_header\fR +Don't display header when listing results. .TP \fB\-q\fR, \fB\-\-quiet\fR Print no warning or informational messages, only error messages. This is equivalent to the \fBquiet\fR command. +.TP +\fB\-p\fR, \fB\-\-parsable\fR +Make output '|' delimited. + .TP \fB\-v\fR, \fB\-\-verbose\fR Print detailed event logging. @@ -40,8 +45,7 @@ This is equivalent to the \fBverbose\fR command. Print version information and exit. This is equivalent to the \fBversion\fR command. -.TP -\fBCOMMANDS\fR +.SH "COMMANDS" .TP \fBexit\fP @@ -52,14 +56,6 @@ Identical to the \fBquit\fR command. \fBhelp\fP Display a description of sreport options and commands. -.TP -\fBhide\fP -Do not display information about hidden or deleted entities. - -.TP -\fBoneliner\fP -Print information one line per record. - .TP \fBquiet\fP Print no warning or informational messages, only fatal error messages. @@ -83,9 +79,89 @@ Display the version number of sreport being executed. \fB!!\fP Repeat the last command executed. +.SH "REPORT TYPES" +.TP +\fBcluster\fP, \fBjob\fP, and \fBuser\fP + +.TP +Various reports are as follows... + cluster - Utilization + job - Sizes + user - TopUsage + +.TP +Each report type has various options... + +.TP +COMMON FOR ALL TYPES +.RS +.TP +.B All_Clusters +Use all monitored clusters default is local cluster. +.TP +.B End=<OPT> +Period ending for report. Default is 23:59:59 of previous day. +.TP +.B Format=<OPT> +Comma separated list of fields to display in report. +.TP +.B Start=<OPT> +Period start for report. Default is 00:00:00 of previous day. +.RE + +.TP +CLUSTER +.RS +.TP +.B Names=<OPT> +List of clusters to include in report. Default is local cluster. +.RE + +.TP +JOB +.RS +.TP +.B Accounts=<OPT> +List of accounts to use for the report Default is all. +.TP +.B Clusters=<OPT> +List of clusters to include in report. Default is local cluster. +.TP +.B GID=<OPT> +List of group ids to include in report. Default is all. +.TP +.B Grouping=<OPT> +Comma separated list of size groupings. (i.e. 50,100,150 would group job cpu count 1-49, 50-99, 100-149, > 150). +.TP +.B Jobs=<OPT> +List of jobs/steps to include in report. Default is all. +.TP +.B Partitions=<OPT> +List of partitions jobs ran on to include in report. Default is all. +.TP +.B Users=<OPT> +List of users jobs to include in report. Default is all. +.RE + +.TP +USER +.RS +.TP +.B Clusters=<OPT> +List of clusters to include in report. Default is local cluster. +.TP +.B Group +Group all accounts together for each user. Default is a separate entry for each user and account reference. +.TP +.B Users=<OPT> +List of users jobs to include in report. Default is all. +.RE + + .SH "EXAMPLES" .eo .br + .ec .SH "COPYING" @@ -107,5 +183,4 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .SH "SEE ALSO" -\fBslurm.conf\fR(5) \fBslurmdbd\fR(8) diff --git a/src/sacctmgr/sacctmgr.c b/src/sacctmgr/sacctmgr.c index b19eebb2fb04b10441706ea2ecc73d8864a2917d..c09492dbfcb3ab764d405083d422a3925a0808d1 100644 --- a/src/sacctmgr/sacctmgr.c +++ b/src/sacctmgr/sacctmgr.c @@ -99,6 +99,7 @@ main (int argc, char *argv[]) {"no_header", 0, 0, 'n'}, {"parsable", 0, 0, 'p'}, {"quiet", 0, 0, 'q'}, + {"associations", 0, 0, 's'}, {"usage", 0, 0, 'h'}, {"verbose", 0, 0, 'v'}, {"version", 0, 0, 'V'}, @@ -1406,7 +1407,9 @@ sacctmgr [<OPTION>] [<COMMAND>] \n\ -h or --help: equivalent to \"help\" command \n\ --hide: equivalent to \"hide\" command \n\ -i or --immediate: commit changes immediately \n\ + -n or --no_header: no header will be added to the beginning of output \n\ -o or --oneliner: equivalent to \"oneliner\" command \n\ + -p or --parsable: output will be '|' delimited \n\ -q or --quiet: equivalent to \"quiet\" command \n\ -s or --associations: equivalent to \"associations\" command \n\ -v or --verbose: equivalent to \"verbose\" command \n\ @@ -1430,8 +1433,6 @@ sacctmgr [<OPTION>] [<COMMAND>] \n\ list <ENTITY> [<SPECS>] display info of identified entity, default \n\ is display all. \n\ modify <ENTITY> <SPECS> modify entity \n\ - no_header no header will be added to the beginning of \n\ - output. \n\ oneliner report output one record per line. \n\ quiet print no messages other than error messages. \n\ quit terminate this command. \n\ @@ -1441,7 +1442,7 @@ sacctmgr [<OPTION>] [<COMMAND>] \n\ version display tool version number. \n\ !! Repeat the last command entered. \n\ \n\ - <ENTITY> may be \"cluster\", \"account\", or \"user\". \n\ + <ENTITY> may be \"cluster\", \"account\", \"user\", of \"coordinator\". \n\ \n\ <SPECS> are different for each command entity pair. \n\ list account - Clusters=, Descriptions=, Format=, Names=, \n\ @@ -1483,6 +1484,9 @@ sacctmgr [<OPTION>] [<COMMAND>] \n\ delete user - Accounts=, AdminLevel=, Clusters=, \n\ DefaultAccounts=, and Names= \n\ \n\ + add coordinator - Accounts=, and Names= \n\ + delete coordinator - Accounts=, and Names= \n\ + \n\ \n\ All commands entitys, and options are case-insensitive. \n\n"); diff --git a/src/sreport/sreport.c b/src/sreport/sreport.c index a348dbb59fa4a01034ed461e69b4a11d8a6aef4f..08715ad0e8ea6ab9d5504a57a8cb17d264608c00 100644 --- a/src/sreport/sreport.c +++ b/src/sreport/sreport.c @@ -490,10 +490,11 @@ void _usage () { printf ("\ sreport [<OPTION>] [<COMMAND>] \n\ Valid <OPTION> values are: \n\ + -a or --all_clusters: Use all clusters instead of current \n\ -h or --help: equivalent to \"help\" command \n\ - -o or --oneliner: equivalent to \"oneliner\" command \n\ + -n or --no_header: equivalent to \"no_header\" command \n\ -q or --quiet: equivalent to \"quiet\" command \n\ - -s or --associations: equivalent to \"associations\" command \n\ + -p or --parsable: equivalent to \"parsable\" command \n\ -v or --verbose: equivalent to \"verbose\" command \n\ -V or --version: equivalent to \"version\" command \n\ \n\ @@ -504,18 +505,63 @@ sreport [<OPTION>] [<COMMAND>] \n\ Valid <COMMAND> values are: \n\ exit terminate sreport \n\ help print this description of use. \n\ - no_header no header will be added to the beginning of \n\ - output. \n\ - oneliner report output one record per line. \n\ quiet print no messages other than error messages. \n\ quit terminate this command. \n\ - parsable output will be | delimited \n\ verbose enable detailed logging. \n\ version display tool version number. \n\ !! Repeat the last command entered. \n\ \n\ + Valid report types are: \n\ + cluster <REPORT> <OPTIONS> \n\ + job <REPORT> <OPTIONS> \n\ + user <REPORT> <OPTIONS> \n\ \n\ - All commands, entities, and options are case-insensitive. \n\n"); + <REPORT> is different for each report type. \n\ + cluster - Utilization \n\ + job - Sizes \n\ + user - TopUsage \n\ + \n\ + <OPTIONS> are different for each report type. \n\ + \n\ + COMMON FOR ALL TYPES \n\ + - All_Clusters - Use all monitored clusters default is \n\ + local cluster. \n\ + - End=<OPT> - Period ending for report. \n\ + Default is 23:59:59 of previous day. \n\ + - Format=<OPT> - Comma separated list of fields to display\n\ + in report. \n\ + - Start=<OPT> - Period start for report. \n\ + Default is 00:00:00 of previous day. \n\ + \n\ + cluster - Names=<OPT> - List of clusters to include in report \n\ + Default is local cluster. \n\ + \n\ + job - Accounts=<OPT> - List of accounts to use for the report \n\ + Default is all. \n\ + - Clusters=<OPT> - List of clusters to include in report. \n\ + Default is local cluster. \n\ + - GID=<OPT> - List of group ids to include in report \n\ + Default is all. \n\ + - Grouping=<OPT> - Comma separated list of size groupings. \n\ + (i.e. 50,100,150 would group job cpu count\n\ + 1-49, 50-99, 100-149, > 150). \n\ + - Jobs=<OPT> - List of jobs/steps to include in report. \n\ + Default is all. \n\ + - Partitions=<OPT> - List of partitions jobs ran on to include\n\ + in report. Default is all. \n\ + - Users=<OPT> - List of users jobs to include in report. \n\ + Default is all. \n\ + \n\ + user - Clusters=<OPT> - List of clusters to include in report. \n\ + Default is local cluster. \n\ + - Group - Group all accounts together for each user.\n\ + Default is a separate entry for each user\n\ + and account reference. \n\ + - Users=<OPT> - List of users jobs to include in report. \n\ + Default is all. \n\ + \n\ + \n\ + All commands and options are case-insensitive. \n\n"); }