Using egroup in LSF
Jump to navigation
Jump to search
Use egroup to generate a list of users in LSF.
Useful for when admin have large groups of users and cant be bother to program each user manually.
Create the egroup file
- in $LSF_SERVERDIR/egroup [chmod +x]
#!/bin/bash
if [ "$1" == "-m" ]; then #host group
if [ "$2" == "linux_grp" ]; then #Linux hostgroup
echo "linux01 linux02 linux03 linux04"
elif [ "$2" == "sol_grp" ]; then #Solaris hostgroup
echo "Sol02 Sol02 Sol03 Sol04"
fi
else #user group
if [ "$2" == "srv_grp" ]; then #srvgrp user group
echo "userA userB userC userD"
elif [ "$2" == "dev_grp" ]; then #devgrp user group
echo "user1 user2 user3 user4"
fi
fiEdit lsb.users (or lsb.hosts)
egroup will be called when the GROUP_MEMBER flag contains a (!)
Begin UserGroup
GROUP_NAME GROUP_MEMBER USER_SHARES #GROUP_ADMIN
ugroup1 (atlasprod) () #()
ugroup2 (lhcbusers) () #()
# The following are generated from the egroup script
srv_grp (!) ()
dev_grp (!) ()
End UserGroup
Begin User
USER_NAME MAX_JOBS MAX_PEND_JOBS
default 400 - # default, any user/group has threshold of 100
#david 5 -
ugroup1@ 100 -
ugroup2@ 200 -
# The following are groups defined are above called from egroup
srv_grp@ 800 -
dev_grp@ 50 -
End UserReconfig
addhost -u
OR
badmin reconfigCheck users are added correctly
[root@vhpchead etc]# busers all
USER/GROUP JL/P MAX NJOBS PEND RUN SSUSP USUSP RSV
atlasprod - 100 0 0 0 0 0 0
david - 400 0 0 0 0 0 0
default - 400 - - - - - -
dev_grp - 400 0 0 0 0 0 0
echin - 400 0 0 0 0 0 0
kcl - 400 0 0 0 0 0 0
lancaster2 - 400 0 0 0 0 0 0
lhcbusers - 200 0 0 0 0 0 0
srv_grp - 400 0 0 0 0 0 0
ugroup1 - 400 0 0 0 0 0 0
ugroup2 - 400 0 0 0 0 0 0
user1 - 50 0 0 0 0 0 0
user2 - 50 0 0 0 0 0 0
user3 - 50 0 0 0 0 0 0
user4 - 50 0 0 0 0 0 0
user5 - 400 0 0 0 0 0 0
userA - 800 0 0 0 0 0 0
userB - 800 0 0 0 0 0 0
userC - 800 0 0 0 0 0 0
userD - 800 0 0 0 0 0 0