Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
doku:slurm_sacct [2015/05/28 13:39] – [Usage of the script] ir | doku:slurm_sacct [2015/05/28 14:35] – [Accounting script] ir |
---|
====== Accounting Info of your project ====== | ====== Accounting info of your project ====== |
| ===== Accounting script ===== |
| |
The script <html> <span style="color:red;font-size:100%;"><b> vsc3CoreHours.py </b></span> </html> calculates the //elapsed core-hours// **per user** in your project and the **total amount of core-hours in your project**. You may give start and end time (default end time is today). Instead you may give a duration //d// which gives you the core-hours within the past //d// days. | The script <html> <font color=#cc3300> <b> vsc3CoreHours.py </b> </font> </html> calculates the **elapsed core-hours per user** in your project and the **total amount of core-hours in your project**. The basic formula in this script takes into account the number of nodes per job and the time difference from start to end |
| |
The basic formula in this script sums up the | |
{{ :doku:corehours.png?500 |}} | {{ :doku:corehours.png?500 |}} |
| |
==== Usage of the script ==== | === Usage of the script === |
=== Example === | You may give start time ''-S ...'' and end time ''-E ...''. Default start time is the start of VSC-3, 2015-04-01T00:00:00, default end time is today. Instead you may give a duration ''-D d'' which gives you the core-hours within the past //d// days. |
| == Examples: == |
<code> | <code> |
/opt/sw/x86_64/generic/bin/vsc3CoreHours.py -S 2015-04-23 -E 2015-05-26T00:00:01 | /opt/sw/x86_64/generic/bin/vsc3CoreHours.py # total project time span |
/opt/sw/x86_64/generic/bin/vsc3CoreHours.py -S 2015-04-23 # default end is today | |
/opt/sw/x86_64/generic/bin/vsc3CoreHours.py -D 7 # last week | /opt/sw/x86_64/generic/bin/vsc3CoreHours.py -D 7 # last week |
| /opt/sw/x86_64/generic/bin/vsc3CoreHours.py -S 2015-04-23 -E 2015-05-26T00:00:01 |
| /opt/sw/x86_64/generic/bin/vsc3CoreHours.py -E 2015-05-26 # project start until 2015-05-26 |
| /opt/sw/x86_64/generic/bin/vsc3CoreHours.py -S 2015-04-23 # 2015-04-23 until today |
</code> | </code> |
<code> | |
sacct -s R -S <project start> -E <today> -X -o JobID,Start,End,NNodes | |
</code> | |
| |
| |
| |
===== sacct ===== | ===== sacct ===== |
| |
The command ''sacct'' allows for assessing information from the SLURM job accounting log or SLURM database. | In order to customize your accounting request, the command ''sacct'' allows for assessing information from the SLURM job accounting log or SLURM database. |
The default output values are jobs, job steps, status, and exit codes. By specifying the format, the output of ''sacct'' can be customized. | The default output values are jobs, job steps, status, and exit codes. By specifying the format, the output of ''sacct'' can be customized. |
In the framework of this section only a minimal subset of options is listed. | In the framework of this section only a minimal subset of options is listed. |
Further possible parameters for the option ''-s'' are: BF BOOT_FAIL, CA CANCELLED, CD COMPLETED, CF CONFIGURING, CG COMPLETING, F FAILED, NF NODE_FAIL, PD PENDING, PR PREEMPTED, R RUNNING, RS RESIZING, S SUSPENDED, TO TIMEOUT | Further possible parameters for the option ''-s'' are: BF BOOT_FAIL, CA CANCELLED, CD COMPLETED, CF CONFIGURING, CG COMPLETING, F FAILED, NF NODE_FAIL, PD PENDING, PR PREEMPTED, R RUNNING, RS RESIZING, S SUSPENDED, TO TIMEOUT |
| |
==== -X -T ==== | ==== -X ==== |
The option | The option |
<code> | <code> |
is useful because it shows only cumulative statistics for each job, not the intermediate steps. | is useful because it shows only cumulative statistics for each job, not the intermediate steps. |
| |
| ==== -T ==== |
The option | The option |
<code> | <code> |
[...@... ~]$ --truncate | [...@... ~]$ --truncate |
</code> | </code> |
truncates time. If a job started before the optionally given start time ''-S YYYY-MM-DD[THH:MM[:SS]]'', the start time would be truncated to YYYY-MM-DD[THH:MM[:SS]]. The same for end time and ''-E YYYY-MM-DD[THH:MM[:SS]]''. | is supposed to truncate time. If a job started before the optionally given start time ''-S YYYY-MM-DD[THH:MM[:SS]]'', the start time would be truncated to YYYY-MM-DD[THH:MM[:SS]]. The same for end time and ''-E YYYY-MM-DD[THH:MM[:SS]]''. |
| |
| //We observed unexpected behavior of this option returning start times later than end times.// |
| |
| |
==== Further options ==== | ==== Further options ==== |