In LSF, we often encounter situations where some applications must be submitted to the specified queues to run when submitted.
If we meet this requirement, we need to judge the process, and then throw the process into the configured queues.
The operation is divided into 3 steps.
1. Configure esub to enable this function
Configure ****/lsf/conf/lsf.conf and add the following lines:
LSB_ESUB_METHOD=check
LSB_SUB_COMMANDNAME=Y
2. Configure esub related files
Create a configuration file: ****/linux2.6-glibc2.3-x86_64/etc/esub.check.
Edit the esub.ckeck file
#!/bin/bash
.$LSB_SUB_PARM_FILE
exec 1>&2
echo $LSB_SUB_COMMAND_LINE|grep 进程名 >/dev/null
if [ $? -eq 0 ];then
echo redierct job to queue: 指定的queues
echo LSB_SUB_QUEUE=\"指定的queues\">> $LSB_SUB_MODIFY_FILE
fi
exit 0
3. Create dedicated queues to receive submitted tasks
Create a new queue in ****/lsb.queues:
Begin Queue
QUEUE_NAME = 队列名 //队列名
PRIORITY = 40 //队列优先级
RERUNNABLE = Y //RERUNNABLE
UJOB_LIMIT = 40 //每用户可提交作业数量
#RUN_WINDOW = 20:00-8:30
#USERS = xxxx xxxx //指定用户可提交,用户名 以空格分隔
#HOSTS = xxxx xxxx xxxx xxxx xxxx //队列中包含哪些服务器,服务器名,以空格分隔
DESCRIPTION = xxxx queues //队列描述
End Queue
Restart to make the configuration take effect
lsadmin reconfig
badmin reconfig
badmin mbdrestart
badmin hrestart
{{o.name}}
{{m.name}}