Table of Contents * Previous Chapter * Next Chapter
The simplest thing to do is put the license file where the vendor suggests putting it. If you've received the file via e-mail, you can use the email message itself as the license file, since all lines not beginning with FLEXlm keywords are considered comments.
Normally, the only things you can change in a license file are
On Unix:
We strongly recommend that lmgrd not be run as root, since any process run by root is a potential OS security risk.
% lmgrd -c license_file_path -l logfile &
If you run lmgrd from a boot startup script, you can run it as a regular user using the su command:
su username -c 'umask 022; /path/lmgrd -c /path/license.dat -l /path/log'
Note that as of v4, lmgrd automatically runs in the background on Unix.
On Windows/NT:
You can start lmgrd in a DOS window, but you MUST add -app to the command line. If you don't add -app, it will hang for 20 seconds, and then exit, with no error message.
c:\flexlm\i86_n3\lmgrd -app -c license_file_path -l logfile
OR
You can use the "FLEXlm License Manager" icon in the Control Panel.
Make sure you have the correct paths for "lmgrd.exe" and "license.dat". Then click on the "START" button.
You also have the option of setting up lmgrd as a service from the FLEXlm control panel (if your vendor included it). To do this open the control panel and specify the path to lmgrd, the license file and the logfile. Then click on the "Use NT Services" and the "Start on Power-up" check boxes and lmgrd will run as an NT service, starting on power-up.
The Control Panel can also be used Windows 95/98. You can not run it as a service, but you can have lmgrd start on power-up. It works the same as on NT.
To install as a service, use the INSTALL.EXE command provided by FLEXlm. For example:
C:\FLEXLM> installs C:\flexlm\lmgrd.exe
For reasons unknown some /etc/rc (/etc/rc2.d, /sbin/rc2.d, etc.) files refuse to run lmgrd with the simple command listed above. There are 3 workarounds we know to work - either or both should fix the problem:
% lmgrd_path -c license_file_path >& log_path &
$ nohup lmgrd_path -c license_file_path > log_path 2>&1 &
On Unix, edit the appropriate boot script, which may be /etc/rc.boot, /etc/rc.local, /etc/rc2.d/Sxxx, /sbin/rc2.d/Sxxxx, etc. Remember that these scripts are run in /bin/sh, so do not use the csh `>&' redirection syntax.
Each Unix operating system can have some quirks in doing this, but the following script has been successfully tested for HP700 systems. See the notes following for a full explanation.
/bin/su daniel -c 'echo starting lmgrd > \ /home/flexlm/v5.12/hp700_u9/boot.log' /bin/nohup /bin/su daniel -c 'umask 022; \ /home/flexlm/v5.12/hp700_u9/lmgrd -c \ /home/flexlm/v5.12/hp700_u9/license.dat >> \ /home/flexlm/v5.12/hp700_u9/boot.log' /bin/su daniel -c 'echo sleep 5 >> \ /home/flexlm/v5.12/hp700_u9/boot.log' /bin/sleep 5
/bin/su daniel -c 'echo lmdiag >>\ /home/flexlm/v5.12/hp700_u9/boot.log' /bin/su daniel -c '/home/flexlm/v5.12/hp700_u9/lmdiag -n -c\ /home/flexlm/v5.12/hp700_u9/license.dat >> \ /home/flexlm/v5.12/hp700_u9/boot.log' /bin/su daniel -c 'echo exiting >>\ /home/flexlm/v5.12/hp700_u9/boot.log'
Please note the following about how this script was written:
Finally, on RS-6000 systems, you have to use /etc/inittab to start the license server. The reason is that AIX has not started TCP networking when /etc/rc is run, and lmgrd requires TCP networking.
That's because the license file has only `uncounted' licenses, and these don't require a server. Uncounted licenses have a '0' or 'uncounted' in the `number-of-licenses' field on the FEATURE line.
Note that in v5, uncounted licenses will also be supported, so long as the client application uses port@host or USE_SERVER.
Yes. A server on the internet will serve licenses to anyone else on the internet. You can limit usage with the INCLUDE and EXCLUDE options in the daemon option file to allow (or deny) access to clients running on a range of internet addresses.
Many firewalls require that port numbers be specified to the firewall. Current lmgrds support this. Add "PORT = number" to each DAEMON line. Also allow firewall access to all port numbers and the port number on the SERVER line.
Yes, unless the client's whole system crashes. Assuming communications is TCP, the license is automatically freed immediately. If the whole system crashes, then the license is not freed, and you should use lmremove to free the license.
If the whole system running the client application crashes or is disconnected before the license is checked in, the license will NOT be freed automatically. (This is most common on a PC.) To free the license, use lmutil lmremove or stop and restart the server.
FLEXlm applications send periodic heartbeats to the server to discover if it has died. What happens when the server dies is then up to the application. Some will simply continue periodically attempting to re-checkout the license when the server comes back up. Some will attempt to re-checkout a license a few times, and then, presumably with some warning, exit. Some GUI applications will present pop-ups to the user periodically letting them know the server is down and needs to be re-started.
The license file was typed in incorrectly, or it was changed by the user. Use the 'lmcksum' utility to verify the license file. If the file has 'ck=nnn', lmcksum will report simply OK or BAD for each line. Otherwise, you'll have to compare the numbers lmcksum reports with a good file, presumably run by your application's vendor.
99.44% of the time, if it's in use, it's because lmgrd is already running on the port - or was recently killed, and the port isn't freed yet. Assuming this is not the case, then use 'telnet host port' - if it says `can't connect', it's a free port. You can also ping to the port and see if it's in use.
If you use v6+ lmgrd, it will automatically detect that another lmgrd for this license is already running.
This is a tunable parameter on the Solaris OS, we suggest changing it so the port is freed in 2 seconds rather than 4 minutes. To change the setting, as root:
ndd /dev/tcp -set tcp_close_wait_interval <interval>
where interval is in milliseconds. The default is 240000 (4 minutes). We recommend a setting > 2000.
No. There is no part of FLEXlm, lmgrd, vendor daemon or application, that requires root permissions. In fact, it is strongly recommended that you do not run the license server (lmgrd) as root, since root processes can introduce security risks. If lmgrd must be started from the root user (for example, in a system boot script), we recommend that you use the su command to run lmgrd as a non-privileged user:
su username -c"/path/lmgrd -c /path/license.dat -l /path/log"
where username is a non-privileged user, and path is the correct paths to lmgrd, license.dat and debug log file. You will have to ensure that the vendor daemons listed in /path-to-license/license.dat have execute permissions for username. The paths to all the vendor daemons in the license file are listed on each DAEMON line.
It is not prudent to run any command, particularly a daemon, as root on Unix, as it may pose a security risk to the Operating System. Therefore, we recommend that lmgrd be run as a non-privileged user (not `root'). If you are starting lmgrd from a boot script, we recommend that you use
su username -c"umask 022; command"
to run lmgrd as a non-privileged user.