Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


FLEXlm Template and script set
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
bodoe



Joined: 05 Jun 2007
Posts: 6

PostPosted: Fri Jul 06, 2007 2:03 am    Post subject: Reply with quote

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.
Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Tue Jul 10, 2007 8:59 pm    Post subject: Reply with quote

Maybe u can try to remove/delete all that FlexLM systems u want to monitor and recreate again.

SH
Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Fri Jul 13, 2007 7:44 pm    Post subject: Reply with quote

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
Back to top
Taiphun



Joined: 08 Jan 2007
Posts: 21

PostPosted: Wed Jul 18, 2007 2:31 pm    Post subject: Reply with quote

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:
Code:
$ 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)
...


Here's my lmgrd-poller.pl lines:
Code:
# Servers to poll, daemon name, and TCP port
my %licservers = (
        'server.network'     => {
                '17021'           => {
                        'MLM'     => 'Matlab',
                },
        },
);


What am I missing?

TIA,
Back to top
Taiphun



Joined: 08 Jan 2007
Posts: 21

PostPosted: Wed Jul 18, 2007 4:28 pm    Post subject: Reply with quote

Okay, got that all working.. I wasn't running the lmgrd poller.

Now the rra's aren't being created.
Back to top
Laffer



Joined: 24 Aug 2007
Posts: 14

PostPosted: Fri Aug 24, 2007 8:51 am    Post subject: Same names in different Daemons? Reply with quote

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...
Back to top
Laffer



Joined: 24 Aug 2007
Posts: 14

PostPosted: Fri Aug 24, 2007 11:04 am    Post subject: Reply with quote

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;
Back to top
mpelikan



Joined: 13 Sep 2007
Posts: 2

PostPosted: Thu Sep 13, 2007 6:39 am    Post subject: lmgrd - stale licenses Reply with quote

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
Back to top
Taiphun



Joined: 08 Jan 2007
Posts: 21

PostPosted: Mon Sep 17, 2007 11:42 am    Post subject: Reply with quote

I'm revisiting this again, same problems as first time around - my graphs are all NaN's.

Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Thu Sep 20, 2007 1:12 am    Post subject: Reply with quote

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
Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Thu Sep 20, 2007 1:14 am    Post subject: Reply with quote

Taiphun wrote:
I'm revisiting this again, same problems as first time around - my graphs are all NaN's.



Is your license more than 100? If yes, u have to modify it to allow more than 100. See my previous post.

SH
Back to top
mpelikan



Joined: 13 Sep 2007
Posts: 2

PostPosted: Fri Sep 21, 2007 8:12 am    Post subject: Reply with quote

Hi super-hornet,

please send me the script to "release" the shared memory;
I want to run it onca a day by cron, so that stale licenses do not live until
the next reboot.

Thanks!

Regards,
Martin
Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Mon Sep 24, 2007 4:03 am    Post subject: Reply with quote

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: $!");

---------------------------------------------------------------------------
Back to top
jacobskp



Joined: 09 Aug 2004
Posts: 13

PostPosted: Fri Dec 21, 2007 9:39 am    Post subject: Reply with quote

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 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.
Back to top
Gabro



Joined: 04 Jun 2008
Posts: 1

PostPosted: Tue Jul 01, 2008 3:48 am    Post subject: Reply with quote

Hello

i have problem with flexlm. Everything seems to be ok, but when i look at the graph, it show statistic only for two days ago. The problem is only with flexlm server template.

thx
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 



Powered by phpBB © 2001, 2005 phpBB Group