none
License Activation Filter to query two separate license servers for two separate features RRS feed

  • Question

  • Related to: Multiple FlexLM Activation Filters in a job template.

    Hi, now that I have figured out that I need to be able to call up multiple lmstat commands against multiple servers in a case where one would request two license features that live on separate servers in a single Activation Filter, the question becomes. What is the best way to go about doing that in the FlexLM.Cache class using the ActivationFilter example for FlexLM?

    It currently calls a Process method that uses StartInfo to assign properties to the remote execution of lmstat. The problem is, if I understand it right, it's limited in the fact that it can only call one command (FileName) and one argument to execute, that passes the stdout to the next method in the sequence.

    That said what would be best practice or procedure to allow the FlexLM.Cache class to parse multiple license servers?

    1) Bypass the StartInfo of Process and use two Start(string,string) to a common output file or variable?

    2) Keep the StartInfo and call up a batch or cmd file to utilize a "&" or "&&" to call two lmstat's in line. One for each license server that would both dump to stdout as defined in the StartInfo?

    3) Other options that may be simpler that I'm not thinking of or realize cause I'm new to C# and .NET? ...

    Thanx

    --jpn

    <svg id="midnight-lizard-filters" style="display:none;"><filter id="ml-blue-filter" style="fill:rgb(0, 0, 0) !important;"><fecolormatrix style="fill:rgb(0, 0, 0) !important;" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></fecolormatrix></filter></svg>
    Tuesday, October 3, 2017 2:52 PM

Answers

  • Thanks Qiufang, I went with option 1 and after some playing with alternate implementations of the Process method, I found what I needed to make it work by routing multiple lmstat's to stdin of "Process" to a single stdout. Works great.

    --jpn<svg id="midnight-lizard-filters" style="display:none;"><filter id="ml-blue-filter" style="fill:rgb(0, 0, 0) !important;"><fecolormatrix style="fill:rgb(0, 0, 0) !important;" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></fecolormatrix></filter></svg>

    Wednesday, October 11, 2017 3:56 PM

All replies

  • Hi,

      The Sample code of PollLiceseServer() in the Cache Class is designed for one license server. To support mulitple license server polling, you have to re-design it.

    Your proposed 1) sounds feasible: make multiple calls of lmstat and parseFlexlmOutput multiple times and sum up the available license?


    Qiufang Shi

    Sunday, October 8, 2017 3:39 AM
  • Thanks Qiufang, I went with option 1 and after some playing with alternate implementations of the Process method, I found what I needed to make it work by routing multiple lmstat's to stdin of "Process" to a single stdout. Works great.

    --jpn<svg id="midnight-lizard-filters" style="display:none;"><filter id="ml-blue-filter" style="fill:rgb(0, 0, 0) !important;"><fecolormatrix style="fill:rgb(0, 0, 0) !important;" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></fecolormatrix></filter></svg>

    Wednesday, October 11, 2017 3:56 PM