Skip to main content

Configure License Scheduling

Prerequisites

Network connectivity requirements:

  • Network connectivity between the cluster head node and the license server must be normal.
  • Ensure the firewall allows communication on relevant ports (for example, FlexLM default port 27000).

Permission requirements:

  • ⚠️ Important: Administrator privileges are required.
  • Changes to license scheduling configuration directly affect job scheduling. Operate with caution.

Management Tools

Fsched provides two core configuration tools:

ToolFunction DescriptionComparable Tool
License Server ManagementConfigure and monitor external license serversSimilar to system monitoring tools
License Allocation ManagementManage license allocation policies within the clusterDirectly use the sacctmgr resource command

Note: The license server client query tool is uploaded to the cluster head node by the administrator and is set via the --command-path parameter when adding a license server.

License Server Management

Function Description

Used to configure and monitor external license servers. When external license servers change, the cluster's available license count is automatically adjusted. Supports major license systems such as FlexLM and RLM.

Add a License Server

Command example:

./stateclient add-lic-server \
--addr flex_host:27000 \
--command-path /usr/local/bin/lmstat \
--tracked-lics matlab,nastran,ansys \
--type flexlm \
--name matlab_server

Parameter details:

ParameterDescriptionRequiredDefault
--addrLicense server address, format: hostname:port✅ RequiredNone
--command-pathFull path to the license query command (such as lmstat)✅ RequiredNone
--tracked-licsList of license names to monitor, comma-separated✅ RequiredNone
--typeLicense server type❌ Optional"flexlm"
--nameServer identifier name for management❌ Optional"host_port" format

Notes:

  • The license server name must be unique and correspond one-to-one with the server address host:port. The default is host_port.
  • Because fsched converts license names and server names to lowercase, users must submit license names and server names in lowercase when submitting jobs.

Practical use cases:

  • Add a new license server to the monitoring system.
  • Expand the list of monitored license features.

Remove a License Server

Command example:

./stateclient remove-lic-server --addr flex_host:27000

Parameter details:

ParameterDescriptionRequired
--addrServer address to remove✅ Required

Notes:

  • Removing a server also removes monitoring for all licenses on that server.
  • Ensure no jobs are using licenses from that server.

View License Server Status

Command example:

./stateclient list-lic-servers

Output includes:

  • Server address and name
  • Server type and status
  • Monitored license list
  • Connection status (OK/ERROR)

License Allocation Management

Function Description

Manage license allocation policies within the cluster, controlling the number and percentage of licenses available to each cluster.

Get the Current Cluster Name

scontrol show config | grep ClusterName

Add License Allocation

  1. Check whether the license already exists.
sacctmgr show resource name=test8 server=server3
  1. If it does not exist, you can add it in one step:
sacctmgr add resource name=test8 server=server3 servertype=flexlm type=license count=60 cluster=fastone-1 percentallowed=70
  1. If it already exists:

If the license already exists, you cannot set a new count. If you need to modify it, use the sacctmgr modify resource command.

3.1 Check whether there is an allocation for the current cluster:

sacctmgr show resource withclusters name=test8 server=server3 cluster=fastone-1

3.2 If there is no allocation for the current cluster, you can set percentallowed for the current cluster:

sacctmgr add resource name=test8 server=server3 cluster=fastone-1 percentallowed=70

3.3 If there is already an allocation for the current cluster, you cannot set it again. If you need to modify it, use the sacctmgr modify resource command.

Parameter descriptions:

  • name: license name
  • cluster: fsched cluster name
  • count: total number of licenses, including inside and outside the cluster
  • percentallowed: percentage allowed for the current cluster
  • server: license server name
  • servertype: license server type
  • type: resource name, should be license in this workflow

Modify License Allocation

  • To modify the total license count:
sacctmgr modify resource name=matlab server=server2 set count=200
  • To modify percentallowed for the current cluster:
sacctmgr modify resource name=matlab server=server2 cluster=fastone-1 set percentallowed=30

Parameter descriptions:

  • name: license name
  • server: server name
  • cluster: fsched cluster name
  • count: new total license count
  • percentallowed: new percentage

Delete License Allocation

  • If there is only one cluster, or you want to delete allocations for all clusters:
sacctmgr delete resource where name=matlab server=server2
  • If there are multiple clusters and you want to delete the allocation for the current cluster:
sacctmgr delete resource where name=matlab server=server2 cluster=fastone-1

Parameter descriptions:

  • name: license name
  • server: server name
  • cluster: fsched cluster name

Query License Allocation

  • Query allocations for the current cluster:
# Query all license allocations
sacctmgr show resource withclusters cluster=fastone-1

# Filter by name
sacctmgr show resource withclusters cluster=fastone-1 name=nastran

# Filter by server
sacctmgr show resource withclusters cluster=fastone-1 server=flex_host

# Exact query
sacctmgr show resource withclusters cluster=fastone-1 name=matlab server=rlm_host
  • Query all license allocations:
sacctmgr show resource

Parameter descriptions:

  • name: filter by license name
  • server: filter by server name
  • cluster: fsched cluster name

Complete Configuration Example

Scenario Description

Configure monitoring and allocation for Synopsys APEX20K and primesim licenses.

Step 1: Check Existing Configuration

  • View the current cluster name:
[root@centos7-16c-1 ~]# scontrol show config | grep ClusterName
ClusterName = fastone-1
  • View allocated licenses:
[root@centos7-16c-1 ~]# sacctmgr show resource
Name Server Type Count % Allocated ServerType
---------- ---------- -------- ------ ----------- ----------

The output shows that there are no license allocations configured yet.

Step 2: Determine Total License Count

Use the lmstat command to view the actual license count:

[root@centos7-16c-1 ~]# ./lmstat -f APEX20K -c 27000@10.106.32.69
lmstat - Copyright (c) 1989-2016 Flexera Software LLC. All Rights Reserved.
Flexible License Manager status on Mon 9/8/2025 11:43

License server status: 27000@centos7-64c-9
License file(s) on centos7-64c-9: /fastone/software/lic/Synopsys.dat:

centos7-64c-9: license server UP (MASTER) v11.14.0

Vendor daemon status (on centos7-64c-9):

snpslmd: UP v11.14.0
Feature usage info:

Users of APEX20K: (Total of 999 licenses issued; Total of 0 licenses in use)

Key information: Total of 999 licenses issued means there are 999 total licenses.

Step 3: Configure License Allocation

Allocate license usage permissions for the cluster:

[root@centos7-16c-1 ~]# sacctmgr add resource name=APEX20K server=10.106.32.69_27000 servertype=flexlm type=license count=999 cluster=fastone-1 percentallowed=100
Adding Resource(s)
apex20k@10.106.32.69_27000
Cluster - fastone-1 100%
Settings
Name = apex20k
Server = 10.106.32.69_27000
Description = apex20k
ServerType = flexlm
Count = 999
Type = License
Would you like to commit changes? (You have 30 seconds to decide)
(N/y): y
[root@centos7-16c-1 ~]# sacctmgr add resource name=primesim server=10.106.32.69_27000 servertype=flexlm type=license count=999 cluster=fastone-1 percentallowed=100
Adding Resource(s)
primesim@10.106.32.69_27000
Cluster - fastone-1 100%
Settings
Name = primesim
Server = 10.106.32.69_27000
Description = primesim
ServerType = flexlm
Count = 999
Type = License
Would you like to commit changes? (You have 30 seconds to decide)
(N/y): y

View allocation results:

[root@centos7-16c-1 ~]# sacctmgr show resource
Name Server Type Count % Allocated ServerType
---------- ---------- -------- ------ ----------- ----------
apex20k 10.106.32+ License 999 100 flexlm
primesim 10.106.32+ License 999 100 flexlm

Step 4: Configure License Monitoring

Check existing monitoring configuration:

[root@centos7-16c-1 ~]# /opt/fsched/wrappers/statesvc/bin/stateclient list-lic-servers
Sending requests to server localhost:20051
License Servers (0):
========================================

Add license server monitoring:

[root@centos7-16c-1 ~]# /opt/fsched/wrappers/statesvc/bin/stateclient add-lic-server --addr 10.106.32.69:27000 --command-path /root/lmstat --tracked-lics APEX20K,primesim
Sending requests to server localhost:20051
Successfully added license server: 10.106.32.69:27000 (auto-generated-name) with 2 tracked licenses

Verify monitoring configuration:

[root@centos7-16c-1 ~]# /opt/fsched/wrappers/statesvc/bin/stateclient list-lic-servers
Sending requests to server localhost:20051
License Servers (1):
========================================
Server: 10.106.32.69:27000
Name: 10.106.32.69_27000
Type: flexlm
Command Path: /root/lmstat
Tracked Licenses (2): apex20k, primesim
Status: OK
----------------------------------------

Troubleshooting Guide

Q: Connection fails when adding a server

  • Check network connectivity: ping license_server
  • Verify port access: telnet license_server 27000
  • Confirm the lmstat command path is correct

Q: License monitoring status is abnormal

  • Check whether the license server is running normally
  • Verify that the tracked-lics names match actual license feature names
  • Confirm sufficient permissions to execute the monitoring command

Q: Jobs cannot obtain licenses

  • Check whether license allocation configuration exists
  • Verify that the license counts are sufficient
  • Check whether license monitoring status is normal

Best Practices

  1. Naming conventions: use meaningful names for license servers
  2. Capacity planning: set percentallowed appropriately to avoid resource contention
  3. Monitoring coverage: ensure all critical license features are within the monitoring scope
  4. Regular checks: regularly verify consistency between license allocation and actual usage