lsf安装后配置

先要引用变量

[root@mgmt3 lsf9]# source conf/profile.lsf

然后在本地执行hostsetup

[root@mgmt3 lsf9]# ./hostsetup --top="/gpfs/lsf9" --boot="y" 

然后编辑

[root@mgmt3 lsf9]# vi conf/lsf.cluster.platform
Begin   Host
HOSTNAME  model    type        server r1m  mem  swp  RESOURCES    #Keywords
#apple    Sparc5S  SUNSOL       1     3.5  1    2   (sparc bsd)   #Example
#peach    DEC3100  DigitalUNIX  1     3.5  1    2   (alpha osf1)
#banana   HP9K778  HPPA         1     3.5  1    2   (hp68k hpux)
#mango    HP735    HPPA         1     3.5  1    2   (hpux cs)
#grape    SGI4D35  SGI5         1     3.5  1    2   (irix)
#lemon    PC200    LINUX        1     3.5  1    2   (linux)
#pear     IBM350   IBMAIX4      1     3.5  1    2   (aix cs)
#plum     PENT_100 NTX86        1     3.5  1    2   (nt)
#berry    DEC3100  !            1     3.5  1    2   (ultrix fs bsd mips dec)
#orange   !        SUNSOL       1     3.5  1    2   (sparc bsd)   #Example
#prune    !        !            1     3.5  1    2   (convex)
mgmt3   !   !   1   3.5   ()   ()   (mg)
node01   !   !   1   3.5   ()   ()   (linux)
node02   !   !   1   3.5   ()   ()   (linux)
End     Host

加上node01,和node02两行

然后编辑rhostsetup

[root@mgmt3 lsf9]# vi 9.1/install/rhostsetup
LSF_RSHCMD="ssh -n"
LSF_HOSTS="node01 node02"
LSF_TOPDIR=/gpfs/lsf9
LSF_BOOT=y

然后执行rhostsetup

再执行lsstartup启动服务,所有节点的lsf就都启动了

可以检测

[root@mgmt3 gpfs]# bhosts
HOST_NAME          STATUS       JL/U    MAX  NJOBS    RUN  SSUSP  USUSP    RSV
mgmt3.cluster.com  ok              -      1      0      0      0      0      0
node01             ok              -      1      0      0      0      0      0
node02             ok              -      1      0      0      0      0      0
[root@mgmt3 gpfs]# lshosts
HOST_NAME      type    model  cpuf ncpus maxmem maxswp server RESOURCES
mgmt3.clust  X86_64   PC6000 116.1     1   1.9G   3.9G    Yes (mg)
node01       X86_64   PC6000 116.1     1   1.9G   3.9G    Yes (linux)
node02       X86_64   PC6000 116.1     1   1.9G   3.9G    Yes (linux)

 编辑lsb.queues可以添加队列

[root@mgmt3 lsf9]# vi ./conf/lsbatch/platform/configdir/lsb.queues
Begin Queue
QUEUE_NAME   = test
PRIORITY     = 40
NICE         = 10
r1m          = 0.8/2.5
USERS = all
HOSTS = all
DESCRIPTION  = Jobs submitted to this queue will be chkpnt-ed automatically\
and also rerunnable.
End Queue

重启服务,读取配置

[root@mgmt3 lsf9]# lsadmin reconfig

然后新建一个普通用户测试

[syk@mgmt3 ~]$ bsub -n 1 -q test sleep 10000
Job <5> is submitted to queue <test>.
[syk@mgmt3 ~]$ bjobs
JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
5       syk     PEND  test       mgmt3.clust             *eep 10000 Apr 12 15:26
[syk@mgmt3 ~]$ bjobs
JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
5       syk     RUN   test       mgmt3.clust node01      *eep 10000 Apr 12 15:26
原文地址:https://www.cnblogs.com/sickboy/p/3016605.html