| Summary: | Getting number of jobs per account with sacct and sreport | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | ARC Admins <arc-slurm-admins> |
| Component: | Accounting | Assignee: | Scott Hilton <scott> |
| Status: | RESOLVED INFOGIVEN | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | ||
| Version: | 21.08.4 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | University of Michigan | Alineos Sites: | --- |
| Atos/Eviden Sites: | --- | Confidential Site: | --- |
| Coreweave sites: | --- | Cray Sites: | --- |
| DS9 clusters: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Linux Distro: | --- |
| Machine Name: | CLE Version: | ||
| Version Fixed: | Target Release: | --- | |
| DevPrio: | --- | Emory-Cloud Sites: | --- |
|
Description
ARC Admins
2021-12-02 08:39:57 MST
David, First of all sacct -D literally means include the duplicates. Specifically the duplicate jobids. https://slurm.schedmd.com/sacct.html#OPT_duplicates In the case a job is requeued and started again, you will have two records with the same jobid both of which used resources, though the first didn't run to completion. This is the most common way to get duplicate job ids The sreport script skips all jobs that don't have any elapsed time. It also includes duplicate jobs. sacct -nPXDT -S $STARTDATE -E $ENDDATE -M $CLUSTER -A $ACCOUNT --format=jobid,elapsed | grep -x 00:00:00 -Scott (In reply to Scott Hilton from comment #1) > In the case a job is requeued and started again, you will have two records > with the same jobid both of which used resources, though the first didn't > run to completion. This is the most common way to get duplicate job ids This is what we (Umich) want, in the case of billing (which is something our site has to do), since a job may use resources, get re-queued, and earn a charge. > The sreport script skips all jobs that don't have any elapsed time. It also > includes duplicate jobs. > > sacct -nPXDT -S $STARTDATE -E $ENDDATE -M $CLUSTER -A $ACCOUNT > --format=jobid,elapsed | grep -x 00:00:00 At first I was confused on what you are getting at. I'm only one cup of coffee into the day, so let's see if I get this right. What I *think* you're getting at is that sreport grabs the duplicate jobs by default, whereas sacct has to be _told_ to do that (with the -D flag). And sreport also omits jobs with 0 ElapsedRaw by default, and sacct does _not_. Given these two statements, it is not reasonable to expect analogous output/results from the two commands I initially sent. Would that be true? David David,
I see that my last paragraph was rather confusing.
Yes, the two commands you sent will not match.
However, the command I sent at the end of the last message should match sreport. Except I wrote grep -x instead of grep -v which is what I meant to write. Also grep -c will give the line count, which is what you are looking for anyway.
>sacct -nPXDT -S $STARTDATE -E $ENDDATE -M $CLUSTER -A $ACCOUNT --format=jobid,elapsed | grep -cv 00:00:00
-Scott
David, Do you have anymore questions on this ticket? -Scott (In reply to Scott Hilton from comment #4) > David, > > Do you have anymore questions on this ticket? > > -Scott Scott, I do not. I apologize. I thought I closed it yesterday as RESOLVED INFO GIVEN. Thanks for checking. David Closing Ticket |