#5 apvsys-lmstat : specify license file !

closed-fixed
None
5
2003-01-15
2003-01-07
Anonymous
No

There is a problem with apvsys-lmstat :

The license status (FlexLM) is extracted by specifying
the
license file using the LM_LICENSE_FILE env var. and
calling "lmstat -a".

If the user has a "$home/.flexlmrc" file that contains
some
other paths to license files/servers, the status of
those
licenses will also be listed, even if you specify just
one
specific license file using the LM_LICENSE_FILE
variable !

So the license paths of the LM_LICENSE_FILE variable
and the ones specified in the .flexlmrc command get
merged and the license status of them all is listed.

This is not the behaviour that we want, we only want to
see te license status that belongs to the tool
specified with
the "apv -l" command...

The .flexrmrc file is often created in the user's home
dir
by some tools or during installation of tools, without
the user being aware of it.

The (only ?) way to avoid this behaviour (according to
the
FlexLM manuals) is to specify the license file with the
"-c"
command line option when calling lmstat.
This will only list the license status of the file
specified
with the "-c" option and the contents of the
$HOME/.flexlmrc
option is ignored.

So, the small change required to apvsys-lmstat is :

diff apvsys-lmstat.pl.original apvsys-lmstat.pl
59c59
< system("lmstat -a");
---
> system("lmstat -a -c $ENV{LM_LICENSE_FILE}");

This will fix the problem.
(credits to bavs for finding this solution !)

Kind regards and ... Happy New Year !!

- Philip -

Discussion

    • assigned_to: nobody --> apvsys
    • status: open --> open-accepted
     
  • Logged In: YES
    user_id=515263

    Thank you for your feedback,

    I think effectively that it could be the
    default behaviour but it is also dangerous because the real license file
    taken into account could another one that you see with the command apv -
    l

    I've to think about your solution that I will certainly
    reuse.

    Thanks

    Arnaud

     
  • Logged In: YES
    user_id=515263

    Ok, I've decided (and implemented ;-) )

    apv -l gives the behaviuor
    you want (ignore the $HOME/.flexlmrc)

    apv -L take care about the
    $HOME/.flexlmrc as apv -l did in the past.

    By the way, I've
    implemented a feature filter in this functionnality. This is done in release
    0.99e

     
    • status: open-accepted --> open-fixed
     
    • status: open-fixed --> closed-fixed