FLEXlm Template and script set

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

Moderators: Developers, Moderators

stubbi
Posts: 1
Joined: Fri Dec 08, 2006 8:35 am
Location: Germany

Post by stubbi »

Hello!

I try to install these scripts since 2 days....
I have the same problem as Slay.

The test on the commandline is OK but i can't display any graphs in cacti.

I use the VMWare appliance from the download-section it runs with cacti 0.8.6g, is this the problem?

I have read this topic nearly 10 times....

I try to use the v0.0.2, therefor I've try V0.0.1.

Has anybodoy an idea?

Thanks

Stubbi
yaroz
Posts: 1
Joined: Thu Jan 18, 2007 9:57 am

Post by yaroz »

I am running the modified version, and am wondering if it's possible to graph out two seperate license servers on the same host, that have the same features, but different daemon/ports. For instance, I've got a license server running for ABC version 5 and ABC version 6. One is running on 7655 and one on 7656. The daemon for version 5 is daemon05 and the one for version 6 is daemon06. However, the feature is listed as ABC on both of them.

For some reason, it's not collecting the data for daemon06. I've verified that everything is in the config file fine, and restarted the perl script.
pould
Posts: 2
Joined: Sun Jun 25, 2006 1:41 pm

Post by pould »

Actually we tried cacti before using License Statistics and had a few problems too. With License Statistics we got everything up and running in 15 minutes. At least it was good for us since we needed results fast and didn't have time to play around with this for days.

-- Poul
cactiuser78
Posts: 1
Joined: Fri Feb 02, 2007 12:51 am

Post by cactiuser78 »

I would really appreciate any help debugging my problem.

I have the lmgrd poller and the query scripts installed. When I try and run the lmgrd-query script from a command line, it responds correctly.

I have imported all the xml files, placed lmgrd.xml in the resources/script_queries directory.

I now go to add a device. Remove public from the community string and leave empty. I change port to my flexlm server port. It reports success, howver, there is no data(0 Items, 0 Rows)

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 index'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 query appname'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 query package'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'


Any suggestions.

This program will be very useful to get working.

Any help is appreciated.

Thanks.
dave99
Posts: 26
Joined: Fri Mar 17, 2006 11:12 pm

Post by dave99 »

Is there a way to change the names that come back from the poller? (it kind of looks like this was an option in the first version). My results come back from the poller like this:
42600ACD_2004_0F
43300ACDLAND_2004_0F
45400A-CIVDES_2004_0F

those longer ones get truncated a bit on the graph, and all would be a bit more readable if I could translate them to AutoCAD, LandDesktop & Civil Desktop.
thanks
rbecker
Posts: 26
Joined: Mon Feb 12, 2007 6:17 pm
Location: Bay Area, CA

Post by rbecker »

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.
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Post by pvenezia »

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.
Last edited by pvenezia on Mon Apr 02, 2007 3:15 pm, edited 1 time in total.
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Post by pvenezia »

stubbi wrote:Hello!

I try to install these scripts since 2 days....
I have the same problem as Slay.

The test on the commandline is OK but i can't display any graphs in cacti.

I use the VMWare appliance from the download-section it runs with cacti 0.8.6g, is this the problem?

I have read this topic nearly 10 times....

I try to use the v0.0.2, therefor I've try V0.0.1.

Has anybodoy an idea?

Thanks

Stubbi
I haven't revisited this code since I wrote it many moons ago, but the poller is an autonomous process, not related to Cacti. When you execute the test, you're verifying that the poller is running properly and the IPC data is accessible. The aforementioned graphing problems look to be missing the hostname of the license server. It should look like this:

Code: Select all

+ Executing script for list of indexes 'perl /var/www/cacti/scripts/query_lmgrd.pl lic.example.com 5280 index'
where the FQDN matches a server specified in the configuration of the poller. Slay's output shows <ipaddr>, which means that Cacti isn't sending the script the hostname of the server to query, and thus, no data.
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Post by pvenezia »

dave99 wrote:Is there a way to change the names that come back from the poller? (it kind of looks like this was an option in the first version). My results come back from the poller like this:
42600ACD_2004_0F
43300ACDLAND_2004_0F
45400A-CIVDES_2004_0F

those longer ones get truncated a bit on the graph, and all would be a bit more readable if I could translate them to AutoCAD, LandDesktop & Civil Desktop.
thanks
It could be done with a trans hash, which I suppose could be added in a new version. Since someone's already released another version, I'll probably just let others rework the code.

Actually, having re-read the post attached to the "0.0.2" release of this code, I have no idea what they were trying to achieve. I'd just use my original code, which includes the translation you're describing.
Last edited by pvenezia on Tue Apr 03, 2007 12:36 pm, edited 1 time in total.
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Post by pvenezia »

cactiuser78 wrote:I would really appreciate any help debugging my problem.

I have the lmgrd poller and the query scripts installed. When I try and run the lmgrd-query script from a command line, it responds correctly.

I have imported all the xml files, placed lmgrd.xml in the resources/script_queries directory.

I now go to add a device. Remove public from the community string and leave empty. I change port to my flexlm server port. It reports success, howver, there is no data(0 Items, 0 Rows)

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 index'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 query appname'
+ Executing script query 'perl /var/www/html/cacti/scripts/lmgrd-query.pl myFQDN 5280 query package'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/lmgrd.xml'


Any suggestions.

This program will be very useful to get working.

Any help is appreciated.

Thanks.
Make sure that 'myFQDN' exactly matches the hostname given in the poller script, and that you can look up the name fwd/rev.
mcm75
Posts: 2
Joined: Fri Apr 06, 2007 4:49 pm

Post by mcm75 »

If the script allows for checking multiple ports of the lmgrd server, how do I go about displaying/querying multiple results if the port number (and only one port number) must go into the snmp port field?
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Post by pvenezia »

mcm75 wrote:If the script allows for checking multiple ports of the lmgrd server, how do I go about displaying/querying multiple results if the port number (and only one port number) must go into the snmp port field?
I set up a new device per license daemon. If a specific server is running a dozen lmgrd processes, then I'll have a dozen device entries, one per daemon. There is no performance penalty involved, and this method permits simple granular graph access per user account, so only those who have an interest in viewing the licenses of a specific application can do so.
mcm75
Posts: 2
Joined: Fri Apr 06, 2007 4:49 pm

Post by mcm75 »

Thanks pvenezia, that helped!
sgn008
Posts: 9
Joined: Tue Apr 10, 2007 12:57 am

lmgrd-query.pl

Post by sgn008 »

Hello,

I was wondering if any of you can give me some suggestion how to resolve missing graph issue on Flexlm.

My env:

OS: RedHat ES 4.0
RRDTool: 1.2.13
PHP : 4.4.6
Apache: 2.0.54.
Mysql: 4.1

RRD files: 270

My crontab under user "cacti" as follow:

*/5 * * * * /usr/local/php/bin/php /usr/local/apache2/htdocs/cacti/poller.php > /dev/null 2>&1
*/5 * * * * /usr/bin/perl /usr/local/cacti/lmgrd-poller.pl > /dev/null 2>&1

My issue:

Graph images are missing after running for more than one hour.

My cacti.log file error:

04/10/2007 12:55:09 PM - CMDPHP: Poller[0] Host[2] DS[45] WARNING: Result from CMD not valid. Partial Result:
04/10/2007 12:55:10 PM - CMDPHP: Poller[0] Host[2] DS[45] WARNING: Result from CMD not valid. Partial Result:
04/10/2007 12:55:29 PM - SYSTEM STATS: Time:28.3538 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:545 RRDsProcessed:275

When I do top -u cacti I got the output like this:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21764 cacti 16 0 19736 5344 1764 S 0.0 0.0 0:01.13 perl
23199 cacti 16 0 19652 5260 1764 S 0.0 0.0 0:01.07 perl
24474 cacti 16 0 19708 5316 1764 S 0.0 0.0 0:01.10 perl
25753 cacti 16 0 19644 5252 1764 S 0.0 0.0 0:01.00 perl
26985 cacti 16 0 19660 5268 1764 S 0.0 0.0 0:00.92 perl
28538 cacti 16 0 19676 5284 1764 S 0.0 0.0 0:00.94 perl
29991 cacti 16 0 19552 5160 1764 S 0.0 0.0 0:00.88 perl
31325 cacti 16 0 19660 5268 1764 S 0.0 0.0 0:00.83 perl
32736 cacti 16 0 19652 5260 1764 S 0.0 0.0 0:00.78 perl
1662 cacti 16 0 19600 5208 1764 S 0.0 0.0 0:00.74 perl
3638 cacti 16 0 19684 5292 1764 S 0.0 0.0 0:00.66 perl
5051 cacti 16 0 19684 5292 1764 S 0.0 0.0 0:00.64 perl
6387 cacti 16 0 19644 5252 1764 S 0.0 0.0 0:00.64 perl
7673 cacti 16 0 19660 5268 1764 S 0.0 0.0 0:00.56 perl
Attachments
cacti_flexlm.png
cacti_flexlm.png (76.42 KiB) Viewed 12110 times
pvenezia
Posts: 20
Joined: Mon Mar 13, 2006 12:39 pm

Re: lmgrd-query.pl

Post by pvenezia »

sgn008 wrote:Hello,

I was wondering if any of you can give me some suggestion how to resolve missing graph issue on Flexlm.

My crontab under user "cacti" as follow:

*/5 * * * * /usr/local/php/bin/php /usr/local/apache2/htdocs/cacti/poller.php > /dev/null 2>&1
*/5 * * * * /usr/bin/perl /usr/local/cacti/lmgrd-poller.pl > /dev/null 2>&1

My issue:

Graph images are missing after running for more than one hour.
lmgrd-poller.pl is a a daemon. You're running a new instance of the daemon from cron every five minutes and corrupting the shared memory. Run it once at boot and be done with it.

-P
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests