[slurm-users] How to print a user's creation timestamp from the Slurm database?

Ole Holm Nielsen Ole.H.Nielsen at fysik.dtu.dk
Mon Jan 20 12:08:54 UTC 2020


Thanks to input from Niels Carl W. Hansen <recnh at cscaa.dk> I have been 
able to write a new slurmusertable tool available from
https://github.com/OleHolmNielsen/Slurm_tools/tree/master/slurmaccounts

This slurmusertable tool reads your current Slurm database user_table and 
prints out a list of usernames, creation time, and modification time.

Read access to the Slurm MySQL database is required, so the appropriate 
MySQL user and hostname must be configured in the MySQL server, see 
https://wiki.fysik.dtu.dk/niflheim/Slurm_database#set-up-mariadb-database

Usage:

slurmusertable [username(s)]

Comments and suggestions for improvement are welcome!

/Ole

On 1/18/20 12:06 PM, Ole Holm Nielsen wrote:
> When we have created a new Slurm user with "sacctmgr create user 
> name=xxx", I would like inquire at a later date about the timestamp for 
> the user creation.  As far as I can tell, the sacctmgr command cannot show 
> such timestamps.
> 
> I assume that the Slurm database contains the desired timestamp(?), so 
> does anyone know how to print it for a named user?
> 
> The reason why I am interested in the user timestamp is that we repeatedly 
> see novice users (students etc.) submitting lots of jobs which are broken 
> or do not use resources correctly.  Since new users' jobs will have a high 
> Slurm priority due to our Fairshare configuration, they quickly waste a 
> lot of resources which could be used much more productively by experienced 
> users.
> 
> My idea is to give new users some rather low resource limits (fairshare 
> GrpTRES GrpTRESMins MaxTRES MaxTRESPerNode MaxTRESMins GrpTRESRunMins QOS 
> DefaultQOS MaxJobsAccrue GrpJobsAccrue) initially.  After a test period of 
> a few weeks or months, I could increase their limits to our normal default 
> values.  If I had a timestamp for the user creation, I could use my 
> scripts to automatically update the user limits after the test period had 
> expired.
> 
> I have thought of recording user creation timestamps outside of Slurm by 
> creating a stop-file in the filesystem whenever running "sacctmgr create 
> user name=xxx".  This would probably do the work, but I prefer to use only 
> the Slurm database information whenever possible.
> 
> Does anyone have other ideas about how to accomplish such a setup?



More information about the slurm-users mailing list