[slurm-users] sacctmgr output with and without associations

6 views
Skip to first unread message

Rémy Dernat via slurm-users

unread,
Sep 3, 2025, 10:55:46 AM (13 days ago) Sep 3
to slurm...@lists.schedmd.com

Hi,

I have a stupid issue about sacctmgr output and associations.

I would like to retrieve my accounts with all the following data :

"Account","Clusters","DefaultQOS","Description","Fairshare","Flags","GrpTRESMins","GrpTRES","GrpJobs","GrpSubmitJob",GrpWall", "MaxTRESMins","MaxTRES","MaxJobs","MaxNodes","MaxSubmitJobs","MaxWall","Organization","ParentName","Priority","QosLevel"

So my command is the following :

sacctmgr list accounts --assoc format="Account","Clusters","DefaultQOS","Description","Fairshare","Flags","GrpTRESMins","GrpTRES","GrpJobs","GrpSubmitJob","GrpWall","MaxTRESMins","MaxTRES","MaxJobs","MaxNodes","MaxSubmitJobs","MaxWall","Organization","ParentName","Priority","QosLevel" -n -P

However, I have a lot of outputs corresponding to each User association entry. That would be fine if a basic `|uniq` would remove everything I don't need, but I am stuck with grptres, which can be seen in the main account, but not in the children associations with the Users. On the opposite, if I remove `--assoc`, I don't have anymore grptres, ParentName, or related Qos values.

I had to add `where User=""` to my first command to just retrieve my main accounts, without User associations.

I dont' know if that is clear enough; is there something I missed with the sacctmgr output ?


Thanks,
Best regards,

Rémy

Guillaume COCHARD via slurm-users

unread,
Sep 4, 2025, 2:15:38 AM (12 days ago) Sep 4
to Rémy Dernat, slurm...@lists.schedmd.com
Hi Rémy,

I’m not sure how to do this using only sacctmgr, but to achieve something similar we added user to the output and then used grep to remove the lines without a user. This way, only the lines corresponding to accounts are kept:

sacctmgr list accounts --assoc format=Account,User,Clusters,[…] -n -P | grep -P "^\w+\|\|.*"

Hope it helps,
Guillaume


De: "Rémy Dernat via slurm-users" <slurm...@lists.schedmd.com>
À: slurm...@lists.schedmd.com
Envoyé: Mercredi 3 Septembre 2025 16:48:31
Objet: [slurm-users] sacctmgr output with and without associations

--
slurm-users mailing list -- slurm...@lists.schedmd.com
To unsubscribe send an email to slurm-us...@lists.schedmd.com
Reply all
Reply to author
Forward
0 new messages