<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ole,<div class=""><br class=""></div><div class="">Your script is a nice piece of scripting but I think you missed the point, if I read your script correctly!</div><div class="">You read limits with:</div><div class=""><br class=""></div><div class="">scontrol -o show assoc_mgr users=$username $selectedaccount flags=Assoc</div><div class=""><br class=""></div><div class="">In our case the limits are declared in a QoS and not in the association and hence will not be picked up and shown in the output.</div><div class="">The purpose of having them in a QoS, which you could read with:</div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">scontrol -o show assoc_mgr users=$username</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""> </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">$selectedaccount flags=QoS</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div class=""><font color="#000000" class="">Is to apply the nodecay flag and hence not influence fair share and priorities.</font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class="">We have a sbank code what output balances and statments to users:</font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[root@slurmdb ~]# sbank balance </span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| | CPU (hours) | GPU (hours) |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| Account | Limit Usage Available | Limit Usage Available |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| staff | ND 729881 ND | ND 18 ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[root@slurmdb ~]# sbank statement</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-----------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| | CPU (hours) | GPU (hours) |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-----------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| Username Account | Limit Usage Available | Limit Usage Available |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-----------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| bandrade staff | ND 182 ND | ND -- ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| easybuild staff | ND 13210 ND | ND -- ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| moliveira staff | ND 1875 ND | ND -- ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| palberto staff | ND 720538 ND | ND -- ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| root staff | ND 7949386 ND | ND -- ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| ---------- staff | ND 729881 ND | ND 18 ND |</span></div><div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgb(16, 16, 16); background-color: rgba(255, 255, 255, 0.85);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-----------------------------------------------------------------------------------------------------------------------</span></div></div><div class=""><br class=""></div><div class="">Best Regards,</div><div class=""><br class=""></div><div class="">MAO<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 23 Jun 2022, at 20:47, Ole Holm Nielsen <<a href="mailto:Ole.H.Nielsen@fysik.dtu.dk" class="">Ole.H.Nielsen@fysik.dtu.dk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 23-06-2022 19:19, Miguel Oliveira wrote:<br class=""><blockquote type="cite" class="">We use a python wrapper to do this but the basic command to retrieved account minutes is:<br class="">'scontrol -o show assoc_mgr | grep "^QOS='+account+’"'<br class="">You then have to parse the output for "GrpTRESMins=“. The output will be two numbers. The first is the limit, or N for no limit, while the next one in parenthesis is the consumed.<br class=""></blockquote><br class="">You may perhaps find it easier to use my showuserlimits script from <a href="https://github.com/OleHolmNielsen/Slurm_tools/tree/master/showuserlimits" class="">https://github.com/OleHolmNielsen/Slurm_tools/tree/master/showuserlimits</a><br class=""><br class="">/Ole<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>