Dear SchedMD-Team, for our accounting we have a little problem with the data we can derive from sreport. In general we would like to use: yesterday=`date '+%Y-%m-%d' --date "-1 day"` sreport -n -p -t Minutes --tres=cpu,gpu cluster AccountUtilizationByUser Start=${yesterday}T00:00:00 End=${yesterday}T23:59:59 | cut -f 3,6 -d '|' | sed "s/|/ /g" | grep -v "^ " Producing an output like: [...] gwdg|all|tehlers|Tim Ehlers|cpu|406| [...] Now I know User "tehlers" consumed 406 minutes walltime yesterday. But we have resources bought by institutes itself and should be excluded from the accounting. So we need somehow to have an option "Nodes=" or "Partition=" in sreport. Now, "Nodes=" and "Partition=" can be used in user-reports and "Nodes=" in reservation-reports, but both cannot output walltime consumption per userid. Would it be possible to include this into sreport? Or do you have another idea how to exclude (or include) a bunch of nodes from the reported usage? Thanks Tim
Hi Tim - we will look into this and get back to you on what we think about this feature request.
Hi, since we kind of urgently need this for the accounting our users, I have checked the code and thought it might be easy with "Partitions", since "assoc_cond->partition_list" is already defined and I thought I can use it like: gwdu105:6 09:09:15 ~/slurm-test3/source/src/sreport # diff -urN cluster_reports.c.ori cluster_reports.c --- cluster_reports.c.ori 2019-05-28 19:23:14.000000000 +0200 +++ cluster_reports.c 2019-06-11 16:35:31.000000000 +0200 @@ -247,6 +247,23 @@ if (format_list) slurm_addto_char_list(format_list, argv[i]+end); + } else if (!xstrncasecmp(argv[i], "Partitions", + MAX(command_len, 3))) { + if (!assoc_cond->partition_list) + assoc_cond->partition_list = + list_create(slurm_destroy_char); + slurm_addto_char_list(assoc_cond->partition_list, + argv[i]+end); + fprintf(stdout, "TE-Debug: %s\n", argv[i]+end); + set = 1; + +/* } else if (!xstrncasecmp(type, "Partitions", MAX(command_len, 3))) { + if (!assoc_cond->partition_list) + assoc_cond->partition_list = + list_create(slurm_destroy_char); + if (slurm_addto_char_list(assoc_cond->partition_list, value)) + set = 1;*/ + } else if (!xstrncasecmp(argv[i], "Start", MAX(command_len, 1))) { assoc_cond->usage_start = parse_time(argv[i]+end, 1); But if I use now "Partitions={partitionname}", the output is always empty: gwdu105:0 09:13:01 ~/slurm-test3/build/src/sreport # ./sreport -n -p -t Minutes --tres=cpu,gpu cluster AccountUtilizationByUser Partitions=medium-fmz Start=${yesterday}T00:00:00 End=${yesterday}T23:59:59 TE-Debug: medium-fmz Could you please have a look again? And maybe decide to add this feature? :) Thanks Tim
Dear SchedMD, any news on the request? If you don't plan to support this, do you have any idea how we could somehow collect the needed data otherwise? Or do you have any idea why my patch is not working? Thanks Tim
Hi Tim - My apologies for not getting to this in a timely fashion. First, some background - sreport is working off of pre-aggregated data from within SlurmDBD. This is why there are some limitations on how it can slice and dice the data again, and why the patch you'd been trying wasn't working - the data simply doesn't exist in the fashion you're trying to query. Unfortunately sreport doesn't cover every site's use case, and there are a number of tools that have been developed to aggregate data in different manners. XDMoD is a fairly popular tool that may cover some of your reporting requests, although I don't think it'll quite handle that specific instance. If GWDG is interested, we could look into custom development work to extend the reports to cover that type of query in general. Otherwise I'm updating this ticket metadata to reflect it as an outstanding enhancement request. - Tim