SurlyJake Blog

Monitoring Flexlm Usage With Zabbix

| Comments

Flexlm license usage can be a hard thing to accurately measure and monitor. Luckily, the output from lmutil can be used to display license usage. First thing to do is locate the lmutil binary and try to get it to run. I use Flexlm for autodesk on Windows and ESRI on linux(centOS).

Windows: This server seemed to want the license file specified. You may need to launch the lmtools GUI tool and watch the status bar for the path to it. This is what mine looked like:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a

That will spit out the current license usage for all your products. To isolate the numbers we want to monitor, we will be piping the output into some other commands like find and cut. I recommend using the GNU tools for windows http://gnuwin32.sourceforge.net/. These examples use the built-in ‘find’ utility, and a ‘cut.exe’ tool i found googling around. I had overlooked the gnutools when I first set this up. My mistake can be your gain. With gnutools, it will be easy to isolate the output you want using ‘grep’ and ‘cut’. First, isolate the line you are looking for with grep. You will have to figure out what feature code you want to monitor. mine looks like this:

Windows:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:"

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO

now that you have the right line,  you can trim the extra characters with ‘cut’. It will take some experimentation to get it right.:

Windows:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:" | cut -c 62-64

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61

The output now should be only the number of licenses being used.

To allow zabbix to monitor this value, we need to create a ‘UserParameter’ read up on it here: http://www.zabbix.com/documentation/1.8/manual/config/user_parameters. This is what the parameter looks like on my servers:

Windows:

UserParameter=licenses.autocad.used,"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:" | cut -c 62-64

Linux:

UserParameter=licenses.arcinfo.used,/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61

Once you have the userparameter created on the license server, restart the agent and add an item in zabbix to begin collecting values.

Comments