How to manage Flexnet Licensing in PBS Pro?

Hi,

I am new to PBS pro and have installed the PBS on machine.
It gets difficult to manage licensing part.
How to manage them to a restriction and use it?
I have heard of the sched_config file in PBS, in which “server_dyn_res” parameter needs to update. But how?

Also, we require a script file which can fetch available licenses through “lmstat -a” command.
But the output of “lmstat -a” is huge. Do we have any script written for this ?

  • qmgr -c “create resource hwu_lic type=long”

  • create a script in /usr/loca/bin/hwu_lic.sh that queries the license server and outputs available number of tokens only (integer)

  • Add it to the resources: line in the sched_config
    resources: “ncpus, aoe, …,hwu_lic”

  • Add the server_dyn_res line
    server_dyn_res: “hwu_lic !/usr/local/bin/hwu_lic.sh”

  • kill -HUP < PID OF THE PBS SCHEDULAR >

  • Submit jobs qsub -l select=1:ncpus=1 -l hwu_lic=100 – /bin/sleep 100

Please request the specific vendor for more information about the license query
Here is the script that might help you:

available=$(/path/to/bin/lmstat -a -c 1700@licenseserver| grep "Users of  feature" | awk >     '{print $6}')
used=$(path/to/bin/lmstat -a -c 1700@licenseserver| grep "Users of feature" | awk '{print $11}')
remaining=$((available-used))
echo $remaining

More about server_dyn_res can be found in this documentation

1 Like

Thanks for answering my queries.
I have created the perl script to get the available licenses.

When creating resource, it is giving Illegal object type error:
Qmgr: create resource Rem_lic type=long
qmgr: Illegal object type: resource.

I am using PBS TORQUE at my side.
Is it the reason behind this “Illegal object type: resource.” error? If yes, do you know the command to create resource in TORQUE?

Those commands are specific PBS Pro OSS and PBS Pro commercial.
PBS Pro OSS is available at this link : http://www.pbspro.org/Download.aspx#download
Documentation: Altair Product Documentation - Altair Community
PBS Pro OSS is not Torque

For your information: