2012年1月18日星期三

How FLEXlm Works


0. Document Source

1. Flexlm components

1. License manager daemon: lmgrd
2. Vender daemon:
3. License file
4. Application program

2. License Request Process

1. application find out the lmgrd server and port from license file
2. application establish connection to lmgrd and tells what vender daemon it needs talk to
3. lmgrd send back the master vendor daemon and port
4. application send license request to vendor daemon
5. vendor daemon send grant or deny back to application

3. Install License Server

1. select the license server and get their hostid
2. give the hostid to your software vendor and get a license file
3. determine if you want to combine it with the existing license file if any
4. install Flexlm utility programs such as lmgrd, lmstat and lmdown unless application vendor’s installation script does so for you
5. start lmgrd manually, and set it up to start automatically at boot time.

4. Specifying Location of License File at Application Hosts

1. Read license file directly by specifying LM_LICENSE_FILE to license file. -OR-
2. Read license file data from lmgrd, by specifying LM_LICENSE_FILE to ‘prot@host’

Note: you can only start lmgrd on the server node specified in the license file

5. Starting lmgrd with License File

Manual Start
C Shell: path_to_lmgrd –c license_file >& log_path &
BASH : path_to_lmgrd –c license_file > log_path 2>&1 &

Auto Start: Add the following to /etc/rc.boot or /etc/rc.local
su username –c ‘umask 022; path_to_lmgrd –c license_file >& log_path &’
su username –c ‘umask 022; path_to_lmgrd –c license_file > log_path 2>&1 &’

Note: the ‘-c’ option overrides the setting of LM_LICENSE_FILE environment variable for lmgrd and other FLeXlm utilites

6. License File Components

1. server name (verdor or lmgrd?) and hostid
2. vendor name and path to vendor daemon exec
3. feature information

1. Server Lines
SERVER hostname hostid [port-number]
Hostname: retuned by hostname
Hostid: returned by lmhostid command
Port-number: optional if FLEXLm TCP service in the network service database
2. Daemon Lines
DAEMON daemon-name daemon_path [options_file_path] [PORT=port_num]

Daemon-name
Name of vendor daemon. Cannot be changed
3. Feature Lines
FEATURE|INCREMENT name daemon version exp_date #lic key \
[HOSTID=hostid][VENDOR_STRING='vendor-string'] \
[vendor_info='...'] [dist_info='...'] [user_info='...'] \
[asset_info='...'] [ISSUER='...'] [NOTICE='...'] [ck=nnn] \
[OVERDRAFT=nnn] [DUP_GROUP=NONE|SITE|[UHDV]]

name
:
name given to the feature by the vendor

daemon
:
name of the vendor daemon; also found in the DAEMON line

version
:
version of this feature that is supported by this license

exp_date
:
for example, 7-may-1996. Note: If the year is 0, then the license never expires

#lic
:
number of concurrent licenses for this feature. If the number of users is set to 0, the licenses for this feature are uncounted and no lmgrd is required but a hostid on the FEATURE line is required.

key
:
license key for this FEATURE line.

7. Combining License Files

Three ways to run multiple vendor daemon
1. Multiple lmgrd server, each running one lmgrd, each lmgrd runs one license file
2. Single lmgrd server, running multiple lmgrd, each lmgrd runs one license file.
3. Single lmgrd server, running one lmgrd and one combined license file

When you can combine license files
1. the number of SERVER line in each file are the same
2. The hostid of each SERVER are the same

When you can NOT combine license files
1. hostid are different because license files are needed to run on different servers
2. One vendor uses a custom hostid algorithm, so the hostid for the same server are different
3. One file is set up for single server ( one SERVER line), the other is set up for redundant server ( has multiple SERVER lines)

8. Common Administration Tools

lmstat - helps you monitor the status of all network licensing activities. (page 44)
lmgrd - the main daemon program for FLEXlm. (page 41)
lmdown - gracefully shuts down all license daemons (both lmgrd and all vendor daemons) on the license server node (or on all three nodes in the case of redundant servers). (page 41)
lmreread - causes the license daemon to reread the license file and start any new vendor daemons. (may cause issue on other lmgrd)
lmhostid - reports the hostid of a system. (page 42)



没有评论: