Ticket 7200 - sreport feature request
Summary: sreport feature request
Status: OPEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Accounting (show other tickets)
Version: 18.08.6
Hardware: Linux Linux
: 5 - Enhancement
Assignee: Unassigned Developer
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2019-06-07 07:28 MDT by Tim Ehlers
Modified: 2021-02-11 14:45 MST (History)
0 users

See Also:
Site: GWDG
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Tim Ehlers 2019-06-07 07:28:20 MDT
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
Comment 1 Jason Booth 2019-06-07 10:22:09 MDT
Hi Tim - we will look into this and get back to you on what we think about this feature request.
Comment 3 Tim Ehlers 2019-07-17 01:16:32 MDT
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
Comment 4 Tim Ehlers 2019-07-31 02:17:29 MDT
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
Comment 5 Tim Wickberg 2021-02-11 14:45:25 MST
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