[slurm-users] About sacct --format: how can I get info about the fields

535 views
Skip to first unread message

xiaoji...@163.com

unread,
Mar 3, 2021, 8:43:09 PM3/3/21
to slurm...@schedmd.com
Hello, guys,

I am doing a parsing job on the output of the sacct command and I know that the —format option can specify the fields you'd like to be outputted.
The difficulty I am facing is that I am in lack of info about the fields. For example, what are the possible values for those fields? What are the default values of the fields if slurm doesn’t have it? Is there any detailed documentation about those fields?

Any help is greatly appreciated!

Best Regards,
Xiaojing

Brian Andrus

unread,
Mar 3, 2021, 10:55:09 PM3/3/21
to slurm...@lists.schedmd.com
man sacct shows us:

-e, --helpformat
    Print a list of fields that can be specified with the --format option.

Brian Andrus

Prentice Bisbal

unread,
Mar 4, 2021, 11:17:24 AM3/4/21
to slurm...@lists.schedmd.com

They're also listed on the sacct online man page:

https://slurm.schedmd.com/sacct.html

Scroll down until you see the text box with the white text on a black background - you can't miss it.

Also,  depending how your parsing the output, you might want to skip printing out the headers, which can be done with the -n or --noheader options. For the link above:

-n, --noheader
No heading will be added to the output. The default action is to display a header.

However, I recommend leaving the headers in until you're sure you have your format syntax correct, to make sure you're getting all the columns you expect.

--
Prentice

xiaoji...@163.com

unread,
Mar 4, 2021, 9:03:34 PM3/4/21
to slurm...@lists.schedmd.com
Hello, slurm users and Brian,

Thanks a lot for your reply. The thing is actually I know the fields. I just need to know detailed info about them. For example, you may get an “Unknown” for some time fields. And the maxVMSize field is an empty string  except for some job steps. I need to know the possible values for each filed to do some calculation on them. But lack of info makes it very difficult.
It seems like there is no documentation on it except for the web pages of sacct command.

Hello, guys,

I am doing a parsing job on the output of the sacct command and I know that the ?format option can specify the fields you'd like to be outputted.
The difficulty I am facing is that I am in lack of info about the fields. For example, what are the possible values for those fields? What are the default values of the fields if slurm doesn?t  have it? Is there any detailed documentation about those fields?

Marcus Boden

unread,
Mar 5, 2021, 3:00:26 AM3/5/21
to slurm...@lists.schedmd.com
Hi Xiaojing,

my experience here is: you will have to try it out and see what works.
At least that's what I do whenever I parse sacct, as I did not find a
detailed description anywhere. The manpage is quite incomplete in that
regard.

Best,
Marcus
--
Marcus Vincent Boden, M.Sc.
Arbeitsgruppe eScience, HPC-Team
Tel.: +49 (0)551 201-2191, E-Mail: mbo...@gwdg.de
-------------------------------------------------------------------------
Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG)
Am Faßberg 11, 37077 Göttingen, URL: https://www.gwdg.de

Support: Tel.: +49 551 201-1523, URL: https://www.gwdg.de/support
Sekretariat: Tel.: +49 551 201-1510, Fax: -2150, E-Mail: gw...@gwdg.de

Geschäftsführer: Prof. Dr. Ramin Yahyapour
Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau
Sitz der Gesellschaft: Göttingen
Registergericht: Göttingen, Handelsregister-Nr. B 598

Zertifiziert nach ISO 9001
-------------------------------------------------------------------------

xiaoji...@163.com

unread,
Mar 5, 2021, 3:11:41 AM3/5/21
to Slurm User Community List
Hi, Marcus,

Very grateful for you reply! I will try it out just as you suggested.

Best Regards,
Xiaojing
Reply all
Reply to author
Forward
0 new messages