I've recently found myself looking at the flexlm log for a Matlab license server a lot. I've been mainly wanting to know two things, when did a given person check out a license and who has checked out licenses between two dates. The format of the flexlm license file makes it quite annoying to answer those questions because the lines for people checking out licenses in and out don't contain date info. All you get is something like this
So if you want to know the date of a particular entry, you can backtrack from it until you find a TIMESTAMP line. It's cumbersome and annoying and gets more so the busier the license server is. I was dealing with a log file that had grown to over 3million lines covering about 17 months. Sometimes the preceding TIMESTAMP is over 500 lines away. Also the date in the TIMESTAMP lines is in the US format month/date/year, which my brain finds hard to deal with. It's a stupid way to write the date. It's not big endian, it's not little endian, it's just a mess that causes endless grief for people not in the US.
Unable to Google up any such pre-existing thing, I ended up writing a script flexlm_add_dates_to_log to parse the log file and prepend dates to all the lines. (As Google bait I'll also say that it adds the date and that you want to add the date.) The result looks like:
Figuring out which date to prepend turned out to be a trickier than it first appeared. At first glance you just go through the file one line at a time and every time you find a TIMESTAMP you write that date to the start of the following lines. But TIMESTAMP lines are written at an intervals of six hours. So you end up with sections of the log that look like this
Well not exactly like that, for one thing MLM also writes TIMESTAMP lines and secondly I've copy/pasted some lines and changed the hour, but it illustrates the problem. The first TIMESTAMP in that example is on the 22nd. So in the above example the 22nd would be prepended to all the IN and OUT lines. But look at the time of the last four IN and OUT lines, they actually happened on the 23rd. The way I dealt with that was to also track the hour. When a TIMESTAMP is found the hour is noted and stored as $hour_last_verified. When an IN or OUT line is encountered, the hour is extracted and if it's less than $hour_last_verified, e.g. $hour_last_verified is 23 and the hour just found is 0, then the date prepended is incremented by a day. (It's actually helpful that the time format used is a half arsed 24 hour clock, half arsed because the hour value isn't padded with a leading zero yet the minutes and seconds are. So you don't have mess around converting 02 in to 2 to do an integer comparison. My script pads the hour value in the ouput for neatness.)
Incrementing the date by a day turned out to be surprisingly problematic too. The script is written in bash, so the obvious way to do something like figure out what the day after a certain date is is to call the date command. This is very easy with GNU date, but sadly Mac OS X and Solaris don't ship with GNU userland and whatever date command they ship with lacks the functionality you'd use with GNU date. I decided I wanted to make life difficult for myself by having the script work on Linux, Mac OS X and Solaris. I then spent far longer than was sensible trying to figure out a single way of doing the date calculation that would work on Linux, Mac OS X and Solaris without resorting to python or perl. I've concluded it's impossible. So the script looks to see if it can find what appears to be GNU date installed somewhere, then the date calculation is done by trying to do it the GNU way then if that fails, doing it another way. (If you want to get GNU userland on Mac OS X, install MacPorts and then install the coreutils package.)
It turned out flexlm_add_dates_to_log can take a while to run if you have a very large file, like the 3million line long one I had. (In my tests anything from 45 minutes upwards.) So I wrote a wrapper script for it flexlm_add_dates_to_log_multi_thread_wrapper which splits the log file in to N chunks, where N is the number of CPU cores, processes them simultaneously then outputs the result to stdout. In my tests it's up to 80% quicker. As with flexlm_add_dates_to_log, this was also more problematic than I initially expected, but I won't bore you with how.
The question of who has checked out license between two dates is actually possible to answer from the raw flexlm log. I figured out how to do it with sed and a regular expression that matched TIMESTAMP lines, but then I negected to save a copy of the regex anywhere and also it required the date to be provided in the US date format. The script I wrote to do it using the output of flexlm_add_dates_to_log is flexlm_checkout_between_dates. It takes input from a file so you'll have to write the output of flexlm_add_dates_to_log to a file first. I didn't bother making flexlm_checkout_between_dates read from stdin because it would be very inefficient to keep running flexlm_add_dates_to_log then piping the output in to flexlm_checkout_between_dates.
Not everyone may be aware of this, but the license files created by a software vendor contain editable lines that a license administrator modifies according to environment requirements and then installs on the license server. The license file contains information about server machines, vendor daemons, and the licensed software, so it is a file to which access should be restricted to only authorized use. But why would you need to edit a FLEXlm license file?
By default, the FlexLM license file is not locked; only individual features/increments are locked. You can get a new feature from the vendor that you can simply paste into the old license file and reread to gain access to it.
The easiest way to remove the old license files and replace them with the new, edited files is by using OpenLM. As a user with administrator privileges (see our article about Roles & Permissions) you need to access only one dashboard where all your license servers are listed. By opening the OpenLM EasyAdmin interface, you can access the license files located on remote license server machines with a simple click.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
One building, one company, one server. Multiple Divsions. The main issue is dedicating users for certain licenses. The Licsense can be combined and put in one .lic file. It's how to handle the option file, reserving each divisions licenses for there users. Is ther a way to do this? Or another Way.
You can reserve a specific count of licenses for a user, computer, group of users or computers, IP address, IP address range or by LM_PROJECT variable association (computer names and user names are case sensitive).
Darren is exactly right. The options file already allows for the reserving or separating of licenses by group. There is no reason to complicate things with multple license managers and multiple options files when a single options file can control everything you need by defining groups. Otherwise, just separate the license managers completely and put them in different servers.
I wish to install the flexlm server on a host which belongs to several networks. The hostname of that server points to a network that the compute nodes cannot access. Therefore, if they try to reach the license server by the name in the license file they cannot reach it.
My question is : when you create a license file you ask for a hostname and an lmhostid. Does it have to be the hostname or can it be an ipname that points to a different network ?
If it is the hostname does it mean I must provide my compute nodes with a route to the hostname so they can reach the flexlm server ?
Thank you for your help.
Best regards,
Patrick Jager
Sorry for the delay. As far as I could figure out the license manager can be reached from clients only via it's the hostname or IP address, i.e. what hostname issues or what ifocnofg issues for it's ethx.
What's important for the license file is the MAC address only. You can use any of what lmhostid issues. Changing the hostid requires going through 'Modify' in the Intel Registration Center as described in this knowledge base article: -us/articles/change--serverhost-data-node-locked-or-floating-license/
Hostnames or IP addresses are not encrypted in the license file. So you can change hostnames/IPs in the license file with an editor and try out wheter the license manager can be reached. In any case you should specify the full hostname including the full domain names.
Regards, Hubert.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
Does anyone else have a problem with the licensing being recognized for Allegro? the only way I can get it to work is if i boot Allegro first before anything else. then i boot Design Entry. after everything else, windows explorer etc. then i boot Expedition. If i boot expedition first I can not get Allegro to see the license, and i have to reboot my computer 3 or 4 times to get the license server to be right again. this has been going on since i loaded Allegro in August. the flexlm licensing has a conflict and Cadence and Mentor Graphics just want to point fingers. I contacted Flexlm and they sent me back to the original software people. I am tired of chasing my tail. Please can you help? Thank you.
7fc3f7cf58