FLEXlm Template and script set
Moderators: Developers, Moderators
Hi all
I have a small problem with displaying graphs. I have two license servers, and can only display graphs for one of them. The error message is
"ERROR: openinf 'XXX/file.rrd': No such file or directory"
The query works fine, verbose query shows correct output. Status for the device is "down", all other devices for the other server have status "up". The device that doesn't work is set up exactly like the other devices that do work.
If I runt the query_lmgrd.pl script with "get" data is displayed correctly, the same goes for "index", "test" and "query".
If this thread isn't dead already, perhaps someone can give me a hint? Would be much appriciated.
I have a small problem with displaying graphs. I have two license servers, and can only display graphs for one of them. The error message is
"ERROR: openinf 'XXX/file.rrd': No such file or directory"
The query works fine, verbose query shows correct output. Status for the device is "down", all other devices for the other server have status "up". The device that doesn't work is set up exactly like the other devices that do work.
If I runt the query_lmgrd.pl script with "get" data is displayed correctly, the same goes for "index", "test" and "query".
If this thread isn't dead already, perhaps someone can give me a hint? Would be much appriciated.
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
Oh! 2 things about this script you have to aware....
1. Remember to modify the Data Source Template's MAXIMUM value. It is default to LIMIT to 100 license. If your license servers has more than 100 license, it will show u "nan" and it will not get plotted.
2. I not sure about the rest but I change all the data in the Graph Template to use EXACT value instead...because u either check out/in 1 license or not...not point something license.
SH
1. Remember to modify the Data Source Template's MAXIMUM value. It is default to LIMIT to 100 license. If your license servers has more than 100 license, it will show u "nan" and it will not get plotted.
2. I not sure about the rest but I change all the data in the Graph Template to use EXACT value instead...because u either check out/in 1 license or not...not point something license.
SH
Hi,
I'm using v0.0.2. I've got everything configured, but when I do 'perl lmgrd-query.pl test' I get nothing.
I can however, run the command from the script manually:
Here's my lmgrd-poller.pl lines:
What am I missing?
TIA,
I'm using v0.0.2. I've got everything configured, but when I do 'perl lmgrd-query.pl test' I get nothing.
I can however, run the command from the script manually:
Code: Select all
$ lmutil lmstat -c 17021@server.network -S MLM
lmutil - Copyright (c) 1989-2004 by Macrovision Corporation. All rights reserved.
Flexible License Manager status on Wed 7/18/2007 13:25
DAEMONs in configuration file: MLM
Users of features served by MLM:
Users of TMW_Archive: (Uncounted, node-locked)
Users of MATLAB: (Total of 8 licenses issued; Total of 0 licenses in use)
Users of SIMULINK: (Total of 6 licenses issued; Total of 0 licenses in use)
Users of Curve_Fitting_Toolbox: (Total of 1 license issued; Total of 0 licenses in use)
Users of Control_Toolbox: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of Signal_Blocks: (Total of 1 license issued; Total of 0 licenses in use)
Users of Excel_Link: (Total of 4 licenses issued; Total of 0 licenses in use)
Users of Identification_Toolbox: (Total of 4 licenses issued; Total of 0 licenses in use)
Users of MPC_Toolbox: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of NCD_Toolbox: (Total of 1 license issued; Total of 0 licenses in use)
Users of Neural_Network_Toolbox: (Total of 1 license issued; Total of 0 licenses in use)
...
Code: Select all
# Servers to poll, daemon name, and TCP port
my %licservers = (
'server.network' => {
'17021' => {
'MLM' => 'Matlab',
},
},
);
TIA,
Same names in different Daemons?
Is it possible if Modules have the same name on different Vendor Daemons, that lmgrd does not properly handle them?
Example:
First I configured only one Licence Daemon and Cacti reported around 80 licence modules (apps).
Then I configured a second one, because we run another daemon for a new version of the same application (UGS NX3 and NX5). Now from the first one I have only 24 records as data query result as opposed to 80 before...
Example:
First I configured only one Licence Daemon and Cacti reported around 80 licence modules (apps).
Then I configured a second one, because we run another daemon for a new version of the same application (UGS NX3 and NX5). Now from the first one I have only 24 records as data query result as opposed to 80 before...
I fixed it:
Change the lines in lmgrd-poller.pl
# Well, this is stupid.
my %tmpstat = %licstatus;
$tmpstat{$lserver}{$app."_".$1}{total} = $2;
$tmpstat{$lserver}{$app."_".$1}{package} = $licservers{$lserver}{$lport}{$app};
$tmpstat{$lserver}{$app."_".$1}{inuse} = $3;
$tmpstat{$lserver}{$app."_".$1}{port} = $lport;
%licstatus = %tmpstat;
# print Dumper %licstatus;
Change the lines in lmgrd-poller.pl
# Well, this is stupid.
my %tmpstat = %licstatus;
$tmpstat{$lserver}{$app."_".$1}{total} = $2;
$tmpstat{$lserver}{$app."_".$1}{package} = $licservers{$lserver}{$lport}{$app};
$tmpstat{$lserver}{$app."_".$1}{inuse} = $3;
$tmpstat{$lserver}{$app."_".$1}{port} = $lport;
%licstatus = %tmpstat;
# print Dumper %licstatus;
lmgrd - stale licenses
Hi,
the lmgrd-poller is really good stuff; I installed the lmgrd-poller-0.0.2 version;
Only one thing isn't very nice;
the lmgrd-poller.pl is running and collecting the flexlm stats of my LICENSE1.
The is picked up from cacti, the graphs are available, everything works very nice :
BUT : I STOP the lmgrd-poller.pl ; but the data from my flexlm LICENSE1 are still
in the TIE::SHARELITE memory cache for hours ...
How long do stale data live?
Is it possible, to clean the cache ; maybe once a day ?
Regards,
Martin
the lmgrd-poller is really good stuff; I installed the lmgrd-poller-0.0.2 version;
Only one thing isn't very nice;
the lmgrd-poller.pl is running and collecting the flexlm stats of my LICENSE1.
The is picked up from cacti, the graphs are available, everything works very nice :
BUT : I STOP the lmgrd-poller.pl ; but the data from my flexlm LICENSE1 are still
in the TIE::SHARELITE memory cache for hours ...
How long do stale data live?
Is it possible, to clean the cache ; maybe once a day ?
Regards,
Martin
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
The data stay in the memory forever till u reboot.
I write an script where I use "destroy" command to release those memory instead.
I recently found a limitation/bug/or whatever u want to call it.
In the poller, each time when it start to do polling, it actually "lock" the IPC first and when finish polling, it "Unlock" it.
I think this is good if that share memory is going to be write by many applications because when the memory is lock, others cannot read or write onto it. Other application have to wait till the share memory is unlock before it can be read or write. But for this lmgrd-poller, there is only one application/script that is doing the writing....which is the poller. Thus I notice that during the time the poller is doing "Polling", the lmgrd-query (use by the cacti) will have to wait till the poller to complete. In this situation, the runtime increases.
I tried to comment out the lock and unlock on the lmgrd-poller and lmgrd-query, and it works!
SH
I write an script where I use "destroy" command to release those memory instead.
I recently found a limitation/bug/or whatever u want to call it.
In the poller, each time when it start to do polling, it actually "lock" the IPC first and when finish polling, it "Unlock" it.
I think this is good if that share memory is going to be write by many applications because when the memory is lock, others cannot read or write onto it. Other application have to wait till the share memory is unlock before it can be read or write. But for this lmgrd-poller, there is only one application/script that is doing the writing....which is the poller. Thus I notice that during the time the poller is doing "Polling", the lmgrd-query (use by the cacti) will have to wait till the poller to complete. In this situation, the runtime increases.
I tried to comment out the lock and unlock on the lmgrd-poller and lmgrd-query, and it works!
SH
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
Script to "destroy" the share memory
---------------------------------------------------------------------------
#!/usr/bin/perl
#use strict;
#no strict 'subs';
use lib "/usr/lib/perl5/site_perl/5.6.1";
use Data::Dumper;
use Tie::ShareLite qw( :lock );
### my $log = '/var/log/lmgrd-poller.log';
my $hostinfo_file = "/usr/share/cacti/scripts/hostinfo.inc";
my %licstatus;
# Use below for the default key
$ipc = tie %licstatus, 'Tie::ShareLite', -key => 2030405,
-mode => 0666,
-create => 'no',
-destroy => 'yes'
or die("Could not tie to shared memory: $!");
---------------------------------------------------------------------------
---------------------------------------------------------------------------
#!/usr/bin/perl
#use strict;
#no strict 'subs';
use lib "/usr/lib/perl5/site_perl/5.6.1";
use Data::Dumper;
use Tie::ShareLite qw( :lock );
### my $log = '/var/log/lmgrd-poller.log';
my $hostinfo_file = "/usr/share/cacti/scripts/hostinfo.inc";
my %licstatus;
# Use below for the default key
$ipc = tie %licstatus, 'Tie::ShareLite', -key => 2030405,
-mode => 0666,
-create => 'no',
-destroy => 'yes'
or die("Could not tie to shared memory: $!");
---------------------------------------------------------------------------
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.Bucket10284 wrote:This app is exactly what I'm looking for, but my problem is that I'm running all of this on Windows and the Perl scripts (including Tie::Sharelite) are built for a UNIX/Linux environment. Can anyone point me in the right direction on where I could go to solve this problem? Thanks.
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.
Who is online
Users browsing this forum: No registered users and 4 guests