Define the host group in lsb.hosts, or the user group in lsb.users, and put an exclamation mark (!) in the GROUP_MEMBER column.
Create an egroup executable in the directory specified by the parameter LSF_SERVERDIR in lsf.conf. LSF does not include a default egroup; you should write your own executable to meet the requirements of your site.
Run the command badmin reconfig to reconfigure the cluster and import your external host and user groups.
External host groups are defined in lsb.hosts, and external user groups are defined in lsb.users. Your egroup executable must define the same group names that you use in the lsb.hosts and lsb.users configuration files.
Run when invoked by the commands egroup –m hostgroup_name and egroup –u usergroup_name. When mbatchd finds an exclamation mark (!) in the GROUP_MEMBER column of lsb.hosts or lsb.users, mbatchd runs the egroup command to invoke your egroup executable.
Output a space-delimited list of group members (hosts, users, or both) to stdout.
Retrieve a list of static hosts only. You cannot use the egroup executable to retrieve hosts that have been dynamically added to the cluster.
The following example shows a simple egroup script that retrieves both host and user group members:
#!/bin/shif [ "$1"="-m" ]; then #host groupif [ "$2"="linux_grp" ]; then #Linux hostgroupecho "linux01 linux 02 linux03 linux04"elif [ "$2"="sol_grp" ]; then #Solaris hostgroupecho "Sol02 Sol02 Sol03 Sol04"fielse #user groupif [ "$2"="srv_grp" ]; then #srvgrp user groupecho "userA userB userC userD"elif [ "$2"="dev_grp" ]; then #devgrp user groupecho "user1 user2 user3 user4"fifi