Updated 4 min readFlexNet Licensing
FlexLM / FlexNet license admin for EDA
FlexLM and FlexNet licensing for EDA tools: license files, lmgrd and vendor daemons, lmstat and lmdiag checks, options files and common error codes.
By the SkyCadEda engineering teamHow these notes are written
On this page
Almost every commercial EDA tool is licensed through FlexNet Publisher, the product that started life as FLEXlm at Globetrotter and is now sold by Flexera. A license server runs lmgrd, which starts one vendor daemon per vendor; the tool asks the server for a named feature, gets it or gets a numbered error, and returns it on exit. Most day-to-day license admin is reading the license file, the options file, the debug log and lmstat output.
Server, daemons and the license file
The license file the vendor sends you has three kinds of lines: SERVER (hostname, host ID, lmgrd port), VENDOR (the vendor daemon name, optional path, options file and port) and signed FEATURE/INCREMENT lines. You may edit the hostname, the ports and the paths on SERVER and VENDOR; touching a FEATURE line breaks its signature and gives error -8.
SERVER licsrv1 0050569a1b2c 5280
VENDOR cdslmd /opt/flexlm/cadence/cdslmd OPTIONS=/opt/flexlm/cadence/cdslmd.opt PORT=5281
USE_SERVER
INCREMENT Example_Feature cdslmd 23.1 31-dec-2027 10 ... SIGN=...Example_Feature stands in for a feature name from your own license file, and the host ID is made up. The lmgrd port is on the SERVER line. The vendor daemon picks a random port unless you set PORT= on the VENDOR line, and you need it fixed if there is a firewall between clients and the server. Common vendor daemon names:
| Vendor | Vendor daemon | Vendor-specific client variable |
|---|---|---|
| Cadence | cdslmd | CDS_LIC_FILE |
| Synopsys | snpslmd | SNPSLMD_LICENSE_FILE |
| Siemens EDA (Mentor) | mgcld (newer releases also use saltd) | MGLS_LICENSE_FILE |
| Ansys | ansyslmd | ANSYSLMD_LICENSE_FILE |
Start lmgrd as an unprivileged license user, normally from a systemd unit so it comes back after a reboot. The + in front of the log path appends instead of overwriting:
lmgrd -c /opt/flexlm/cadence/license.dat -l +/var/log/flexlm/cadence.logClients find the server through port@host. A vendor-specific variable is checked before the generic LM_LICENSE_FILE, which keeps one vendor's server list from slowing down another vendor's checkouts. Separate several servers with : on Linux:
export CDS_LIC_FILE=5280@licsrv1:5280@licsrv2
export SNPSLMD_LICENSE_FILE=27000@licsrv1For redundancy, FlexNet supports a three-server configuration: three SERVER lines in one license file, and licenses are served as long as two of the three are up. The vendor has to issue the file for those three host IDs. Some teams instead split their license count across independent servers listed one after another in the client variable.
Checking status with lmutil
lmutil lmstat -a -c 5280@licsrv1 # every feature, total/in use, who holds what
lmutil lmstat -f Example_Feature -c 5280@licsrv1
lmutil lmdiag -c 5280@licsrv1 Example_Feature # why a checkout would fail
lmutil lmreread -c 5280@licsrv1 -vendor cdslmd # reload license and options files
lmutil lmhostid # host ID to send the vendorUse lmreread after replacing a license file or editing the options file. It is the supported reload; there is no need to signal lmgrd. Changing the SERVER hostname or the lmgrd port does need a restart with lmdown and a fresh lmgrd.
Reservations and limits go in the options file
Per-group reservations, caps and timeouts do not go in the license file. They go in the vendor daemon's options file, referenced by OPTIONS= on the VENDOR line:
# cdslmd.opt
GROUP layout lay01 lay02 lay03
GROUP verif ver01 ver02
RESERVE 2 Example_Feature GROUP layout
MAX 4 Example_Feature GROUP verif
TIMEOUT Example_Feature 3600
REPORTLOG +/var/log/flexlm/cdslmd.rlRESERVE holds licenses back for a group, MAX caps a group, TIMEOUT returns idle licenses after the given number of seconds (only if the vendor enables it for that feature), and INCLUDE/EXCLUDE restrict who may check a feature out. Reserved licenses sit idle when their group is not using them, so reserve sparingly. REPORTLOG writes the binary report log that usage-reporting tools read.
Error codes you will actually see
| Code | Meaning | First thing to check |
|---|---|---|
| -1 | Cannot find license file | Client variable unset or misspelt |
| -4 | Licensed number of users already reached | lmstat -f: who holds the feature |
| -5 | No such feature exists | Wrong server in the client variable, or file not reread |
| -8 | Invalid license key or signature | An edited FEATURE line or a mixed-up file |
| -9 | Invalid host | Host ID in the file does not match this machine |
| -10 | Feature has expired | Expiry date on the INCREMENT line |
| -15 | Cannot connect to license server | lmgrd down, wrong port, firewall |
| -18 | Server does not support this feature | Feature exists elsewhere, not on this server |
| -96 | License server machine is down or not responding | Hostname resolution, network |
| -97 | The desired vendor daemon is down | Vendor daemon log; blocked or changed PORT= |
For -15, -96 and -97, test from the client side first: resolve the server name, then nc -vz licsrv1 5280 for lmgrd and the same for the vendor daemon port. The lmgrd debug log records every OUT:, IN: and DENIED: event with the feature, user and host, so grep DENIED /var/log/flexlm/cadence.log is the quickest way to see who was refused and why.
Tracking usage over time
lmstat is a snapshot. Sampling it from cron and keeping the numbers is enough to answer "do we need more of feature X" without a commercial tool. A short Python parser for the per-feature summary lines:
import re, subprocess, time
out = subprocess.run(["lmutil", "lmstat", "-a", "-c", "5280@licsrv1"],
capture_output=True, text=True, timeout=120).stdout
pat = re.compile(r"Users of (\S+):\s+\(Total of (\d+) licenses? issued;"
r"\s+Total of (\d+) licenses? in use\)")
stamp = time.strftime("%Y-%m-%dT%H:%M")
for feature, issued, used in pat.findall(out):
print(f"{stamp},{feature},{issued},{used}")Append that to a CSV every five minutes and plot peak in-use against issued per feature per week. Pair it with the DENIED: count from the debug log: a feature that never reaches its issued count is a candidate to drop at renewal, and one with daily denials is the one to buy more of. Setting up license servers and this kind of reporting is part of our CAD infrastructure services.
Frequently asked questions
What is FlexNet licensing (FlexLM)?
FlexNet Publisher, formerly FLEXlm, is the license manager from Flexera used by Cadence, Synopsys, Siemens EDA and most other EDA vendors. A license server runs lmgrd plus one vendor daemon per vendor (cdslmd for Cadence, snpslmd for Synopsys); tools check features out from that server over TCP and return them when they exit.
What is the FlexNet Licensing Service on Windows?
It is a background service (FNPLicensingService.exe) that some Windows applications install for FlexNet Publisher activation-based licensing. It belongs to the application that installed it and is unrelated to the lmgrd license servers EDA teams run on Linux.
What causes the FlexNet error "No such feature exists" (-5)?
The server that answered does not have the feature the tool asked for. Usually the client is pointed at the wrong server (check CDS_LIC_FILE, SNPSLMD_LICENSE_FILE or LM_LICENSE_FILE), the new license file has not been reread, or the tool version needs a feature name that is not in your contract. lmutil lmstat -a -c port@host lists what the server actually serves.
How do I reload a FlexNet license file without restarting the server?
Replace the file, then run lmutil lmreread -c port@host (add -vendor cdslmd to limit it to one vendor daemon). lmreread also rereads the options file. Changes to SERVER hostnames or the lmgrd port still need a restart.
Related reading
More engineering notes
Working through a problem like this?
Tell us about your flow: the tools, the PDK, what is failing and when it needs to be clean.