FLEXlm Template and script set

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

someuser
Posts: 1
Joined: Fri Oct 10, 2008 5:57 pm

Flexlm cacti script - NO GRAPHS???

Post by someuser »

After some mangling I was able to get everything installed and it appeared that I installed things correctly :D

BUT no graphs are generated... query_lmgrd.pl pick up license info

Code: Select all

XXXXX@XXXXX:~/cacti/cacti-flexlm-0.0.1$ perl ./query_lmgrd.pl test
Dumping hash...
$VAR1 = 'XXXXX';
$VAR2 = {
          'solidworks' => {
                            'inuse' => '1',
                            'total' => '30',
                            'port' => '25734',
                            'package' => 'Solidworks'
                          },
          'kinemat' => {
                         'inuse' => '0',
                         'port' => '1055',
                         'total' => '26',
                         'package' => 'Ansys'
                       },
          'picatv5' => {
                         'inuse' => '0',
                         'port' => '1055',
                         'total' => '26',
                         'package' => 'Ansys'
                       },

And the cacti interface verbose query provides positive indication

Code: Select all

+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/share/cacti/site/scripts/query_lmgrd.pl XXXXX 25734 index'
+ Executing script query 'perl /usr/share/cacti/site/scripts/query_lmgrd.pl XXXXX 25734 query appname'
+ Found item [appname='cae_cosmosfloworkspe'] index: cae_cosmosfloworkspe
+ Found item [appname='cae_cwadvpro'] index: cae_cwadvpro
+ Found item [appname='dwgeditor'] index: dwgeditor
+ Found item [appname='solidworks'] index: solidworks
+ Found item [appname='swofficepremium'] index: swofficepremium
+ Executing script query 'perl /usr/share/cacti/site/scripts/query_lmgrd.pl XXXXX 25734 query package'
+ Found item [package='Solidworks'] index: cae_cosmosfloworkspe
+ Found item [package='Solidworks'] index: cae_cwadvpro
+ Found item [package='Solidworks'] index: dwgeditor
+ Found item [package='Solidworks'] index: solidworks
+ Found item [package='Solidworks'] index: swofficepremium
+ Executing script query 'perl /usr/share/cacti/site/scripts/query_lmgrd.pl XXXXX 25734 query total'
+ Found item [total='30'] index: cae_cosmosfloworkspe
+ Found item [total='30'] index: cae_cwadvpro
+ Found item [total='90'] index: dwgeditor
+ Found item [total='30'] index: solidworks
+ Found item [total='30'] index: swofficepremium
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
I created graphs for the device but I never see any actual graphs show up on the graph tab under the specified host.

One thing I noticed is that the RRD file is non-existant. I go to the data sources link on the cacti console and look to the data source path to verify location. Turn on debug mode and get

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/var/lib/cacti/rra/encs-license_inuse_108.rrd \
--step 300  \
DS:inuse:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
But still no actual rrd file is there. File system permissions are all set to apache user. I have not had any problem creating data sources for other items I am graphing.

It seems to me that 1. the rrd file was not being created and 2. the polling script was not storing data.

even after creating the rrd file manually I was not getting any graphs.

UPDATE1 - oops originally created rrd file as root and forgot to change permissions on the file, that has been fixed.

UPDATE2 - I tried version 2 of the template - it works!?
Last edited by someuser on Mon Oct 13, 2008 1:41 pm, edited 1 time in total.
gsmuthu
Posts: 1
Joined: Mon Oct 13, 2008 9:34 am

How to plot the total number of licenses

Post by gsmuthu »

I could install and configure the template as suggested by pvenezia; but how to plot the total number of licenses for each component?
isse
Posts: 16
Joined: Tue Nov 25, 2008 5:50 am

Post by isse »

jacobskp wrote: I rewrote this to use Cache::FastMmap::WithWin32 for a windows environment last night. It seems to be working and wasn't too difficult as it is mostly just replacing the ShareLite code and turning off the daemonizing since FastMmap doesn't support threads. I turned the poller into a Windows service with srvany.

I saw a few hiccups this morning and it has only been running since 10PM last night, so I'm not going to post any code yet since I'm not entirely sure that I've done this correctly.
How did this go, if its working can you post some info about it ?

Thanks
/Niklas
kmyer
Posts: 2
Joined: Tue Oct 11, 2005 7:44 pm

Post by kmyer »

pvenezia wrote:
rbecker wrote:The issue with the existing versions of this is that they take the SNMP port as the FlexLM port. If you attach this to a host, you can either SNMP query it or you can FlexLM query it, but not both. I'm working on fixing this and reposting a version which will work correctly alongside SNMP querying.
Really? I'd think that you could just specify another host entry for the SNMP stuff and be done with it. I do it that way, and it makes granular graph access simpler too.
Any progress on this? I am currently collecting both SNMP and FlexLM license usage on the same host by hard coding the port value in lmgrd-query.pl, since both my FlexLM daemons run on port 27000. But if they didn't, I'd not be able to collect both SNMP and FlexLM data for the same host. Yes, I could add a second host entry that was FlexLM only, but I'd prefer to have all that info available under one host..
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

how monitor float licese server on windows server via lmutil

Post by cskp12 »

how monitor float licese server on windows server via linux's lmutil
I run lmutil on windows output as attach
it is ok,but lmutil on linux run output nothing
plsease tell me how to
I run this template
Attachments
Lmutil on windows.doc
(61 KiB) Downloaded 399 times
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

My question I anwser

Post by cskp12 »

http://vuksan.com/linux/flexlm.html
FlexLM problems with querying Windows server from Linux
Recently I got a question like this
I have a Windows server running FlexLM for cadence and unigrafx. I am trying to remotely query form a Linux server to this Windows server, but, it doesn't work.
Any ideas? Do I have to change a parameter on the windows flexlm-lmgrd server to allow remote queries?


> /usr/local/bin/lmutil lmstat -c 27000@gregory.zzz.net
***** lmutil - Copyright (c) 1989-2005 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
***** Flexible License Manager status on Fri 7/7/2006 11:31
*****
***** License server status: 27000@GREGORY
***** License file(s) on GREGORY: 27000@gregory.zzz.net:
*****
***** lmgrd is not running: License server machine is down or not responding. (-96,7:13 "Permission denied")
*****

The answer is no. By default FlexLM allows all queries. Problem is in DNS resolution. Basically what happens is that when lmstat contacts FlexLM it redirects it to the vendor daemon e.g. cadenced or similar. Unfortunately the redirect contains the name of the machine specified in license.dat which on Windows machines is almost always the NetBIOS name and not a FQDN (Fully Qualified Domain Name). Windows machines can resolve it since they will use WINS however Linux machines won't. You can solve this problem in either of two ways.
Preferred: change the SERVER line in license.dat to include the FQDN ie. gregory.zzz.net
Add the NetBIOS name in /etc/hosts on your machine
isse
Posts: 16
Joined: Tue Nov 25, 2008 5:50 am

Post by isse »

Any chance some friendly soul can "convert" this to work on a Windows cacti server ?

/N
isse
Posts: 16
Joined: Tue Nov 25, 2008 5:50 am

Post by isse »

So i am able to run the lmstat command and get responses to my cacti server in a command propt. Now how do i best go about getting the values i want from this in to cacti ?

Do i need to put this query in some sort of script that i import to Cacti?
And if so what is the easiest way to do this ?

Thanks

/Niklas
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Re: FLEXlm Template and script set

Post by pirx »

Hi,

I'm unable to get rrd files with the template. Everything looks good, but no rrd files are created. Any idea what to check?

RRDTool Command:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='smtca00084 - DSPACE - DSDD_MANAGER' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='Licenses In Use' \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/smtca00084_dspace_lizenzen_inuse_2800.rrd":inuse:AVERAGE \
DEF:b="/var/lib/cacti/rra/smtca00084_dspace_lizenzen_inuse_2800.rrd":total:AVERAGE \
AREA:a#FF0000FF:"In Use"  \
GPRINT:a:LAST:"Current%8.2lf%s"  \
GPRINT:a:AVERAGE:"Average%8.2lf%s"  \
GPRINT:a:MAX:"Maximum%8.2lf%s\n"  \
LINE3:b#0000FFFF:"Total"  \
GPRINT:b:LAST:" Current\:%8.2lf%s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" 

RRDTool Says:

ERROR: opening '/var/lib/cacti/rra/smtca00084_dspace_lizenzen_inuse_2800.rrd': No such file or directory

cli test:

Code: Select all

$/usr/share/cacti/site/scripts/lmgrd-query.pl test
Dumping hash...
$VAR1 = 'smtca00084';
$VAR2 = {
          'TL_AUTOSAR30' => {
                              'inuse' => '0',
                              'total' => '1',
                              'port' => '27000',
                              'package' => 'DSPACE'
                            },
          'MODEL_COMPARE' => {
                               'inuse' => '0',
                               'total' => '1',
                               'port' => '27000',
                               'package' => 'DSPACE'
                             },
          'TL_CG_BETA' => {
                            'inuse' => '0',
                            'total' => '2',
                            'port' => '27000',
                            'package' => 'DSPACE'
                          },
          'TL_AUTOSAR_SWC' => {
                                'inuse' => '0',
                                'total' => '1',
                                'port' => '27000',
                                'package' => 'DSPACE'
                              },
          'TL_MLCUR14' => {
                            'inuse' => '0',
                            'total' => '4',
                            'port' => '27000',
                            'package' => 'DSPACE'
                          },
          'TL_MLCUR2009A' => {
                               'inuse' => '0',
                               'total' => '4',
                               'port' => '27000',
                               'package' => 'DSPACE'
                             },
          'TL_TGTSIM' => {
                           'inuse' => '0',
                           'total' => '1',
                           'port' => '27000',
                           'package' => 'DSPACE'
                         },
          'FTP' => {
                     'inuse' => '0',
                     'total' => '2',
                     'port' => '27001',
                     'package' => 'Isograph'
                   },
          'TL_MLCUR14SP3' => {
                               'inuse' => '0',
                               'total' => '4',
                               'port' => '27000',
                               'package' => 'DSPACE'
                             },
          'DSDD_MANAGER' => {
                              'inuse' => '0',
                              'total' => '2',
                              'port' => '27000',
                              'package' => 'DSPACE'
                            },
          'TL_ASAP2' => {
                          'inuse' => '0',
                          'total' => '2',
                          'port' => '27000',
                          'package' => 'DSPACE'
                        },
          'TL_MLCUR2007A' => {
                               'inuse' => '0',
                               'total' => '4',
                               'port' => '27000',
                               'package' => 'DSPACE'
                             },
          'TL_BASE' => {
                         'inuse' => '0',
                         'total' => '2',
                         'port' => '27000',
                         'package' => 'DSPACE'
                       },
          'TL_MLCUR2008' => {
                              'inuse' => '0',
                              'total' => '4',
                              'port' => '27000',
                              'package' => 'DSPACE'
                            },
          'TL_MLCUR2006A' => {
                               'inuse' => '0',
                               'total' => '4',
                               'port' => '27000',
                               'package' => 'DSPACE'
                             }
        };

Data Query Debug Information

Code: Select all

+ Running data query [27].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/share/cacti/site/scripts/lmgrd-query.pl smtca00084 27000 index'
+ Executing script query 'perl /usr/share/cacti/site/scripts/lmgrd-query.pl smtca00084 27000 query appname'
+ Found item [appname='DSDD_MANAGER'] index: DSDD_MANAGER
+ Found item [appname='MODEL_COMPARE'] index: MODEL_COMPARE
+ Found item [appname='TL_ASAP2'] index: TL_ASAP2
+ Found item [appname='TL_AUTOSAR30'] index: TL_AUTOSAR30
+ Found item [appname='TL_AUTOSAR_SWC'] index: TL_AUTOSAR_SWC
+ Found item [appname='TL_BASE'] index: TL_BASE
+ Found item [appname='TL_CG_BETA'] index: TL_CG_BETA
+ Found item [appname='TL_MLCUR14'] index: TL_MLCUR14
+ Found item [appname='TL_MLCUR14SP3'] index: TL_MLCUR14SP3
+ Found item [appname='TL_MLCUR2006A'] index: TL_MLCUR2006A
+ Found item [appname='TL_MLCUR2007A'] index: TL_MLCUR2007A
+ Found item [appname='TL_MLCUR2008'] index: TL_MLCUR2008
+ Found item [appname='TL_MLCUR2009A'] index: TL_MLCUR2009A
+ Found item [appname='TL_TGTSIM'] index: TL_TGTSIM
+ Executing script query 'perl /usr/share/cacti/site/scripts/lmgrd-query.pl smtca00084 27000 query package'
+ Found item [package='DSPACE'] index: DSDD_MANAGER
+ Found item [package='DSPACE'] index: MODEL_COMPARE
+ Found item [package='DSPACE'] index: TL_ASAP2
+ Found item [package='DSPACE'] index: TL_AUTOSAR30
+ Found item [package='DSPACE'] index: TL_AUTOSAR_SWC
+ Found item [package='DSPACE'] index: TL_BASE
+ Found item [package='DSPACE'] index: TL_CG_BETA
+ Found item [package='DSPACE'] index: TL_MLCUR14
+ Found item [package='DSPACE'] index: TL_MLCUR14SP3
+ Found item [package='DSPACE'] index: TL_MLCUR2006A
+ Found item [package='DSPACE'] index: TL_MLCUR2007A
+ Found item [package='DSPACE'] index: TL_MLCUR2008
+ Found item [package='DSPACE'] index: TL_MLCUR2009A
+ Found item [package='DSPACE'] index: TL_TGTSIM
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/lmgrd.xml'

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/var/lib/cacti/rra/smtca00084_dspace_lizenzen_inuse_2800.rrd \
--step 300  \
DS:inuse:GAUGE:600:0:100 \
DS:total:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

Code: Select all

ls: cannot access /var/lib/cacti/rra/smtca00084_dspace_lizenzen_inuse_2800.rrd: No such file or directory
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Re: FLEXlm Template and script set

Post by pirx »

*damn*

Found the reason.... When I created the new graphs, I only selected the appropriate "Application Names" in the "Data Query [FLEXlm Applications" and not the graph template.

-> Graph Templates
--> Graph Template Name
--->Create: FLEXlm Licenses

This was really stupid. Sorry for the noise.
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Re: FLEXlm Template and script set

Post by pirx »

nope... seems there is still a different problem. I added a second host with the flexlm template and this time I did all correct. Still missing the rrd files.
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Re: FLEXlm Template and script set

Post by pirx »

Well... with Uptime Goes Backwards as Re-Index Method the rrd files and graphs were not created. I now changed it to None and everything is working.
atalukdar1
Posts: 1
Joined: Thu Aug 11, 2011 4:26 am

Re: FLEXlm Template and script set

Post by atalukdar1 »

This is really a great product and it worked very well with most of the FlexLM server . I have used it for both Linux and Windows based FlexLM server. Few things to note :

1) Provide IP address instead of hostname sometimes help to troubleshoot other error.
2) Check permission of query_lmgrd.pl , it should have executable permission with cacti user
3) use "Version 1" of SNMP while creating device using your new license server.
4) Use "FlexLM template" while creating new device
4) Run "Verbose query" if it does not show query while creating new devices.

With this you may save some money which you might have spent with commercial products like OpenLM .

Regards,

Amitabh Talukdar
Kuwait
mkoch
Posts: 1
Joined: Mon Sep 12, 2011 4:10 am

Re: FLEXlm Template and script set

Post by mkoch »

Hello,

please can you tell me if there are "new" download paths for
the FLEXlm templates and scripts?

Thanks for your answer.

Regards,
Meinolf Koch
jkissane
Posts: 1
Joined: Tue Feb 05, 2013 9:07 am

Re: FLEXlm Template and script set

Post by jkissane »

We've been using this great tool for over a year and recently added a new license server that we want to monitor. For some reason the queries to the FlexLM license manager on the new server aren't working. After a bit of troubleshooting I found that the PERL scripts are coming back with no info even when run directly from the command line i.e.

perl /usr/share/cacti/scripts/query_lmgrd.pl FQDN 5280 query appname

returns nothing for the new server but lists all the products from the old server. I did notice the FlexLM version is a newer version but otherwise not sure where to look?

Working version:

# ./lmver lmgrd
lmver - Copyright (c) 1989-2005 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
FLEXnet Licensing v10.8.0.1 build 19446 (liblmgr.a), Copyright (c) 1988-2005 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.

Non-working version:

# ./lmver lmgrd
lmver - Copyright (c) 1989-2009 Acresso Software Inc. All Rights Reserved.
FLEXnet Licensing v11.7.0.0 build 73797 i86_lsb (liblmgr.a), Copyright (c) 1988-2009 Acresso Software Inc. All Rights Reserved.

Any suggestions are very welcome. Thanks :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests