Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 274027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:32:48+00:00 2026-05-12T00:32:48+00:00

Does anyone have any experience querying FlexLM? (At a minimum) I need to be

  • 0

Does anyone have any experience querying FlexLM? (At a minimum) I need to be able to tell if a license is available for a particular application. Previously this was done by checking what processes were running, but if I can somehow query FlexLM, that would be more elegant!

  • 1 1 Answer
  • 4 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:32:49+00:00Added an answer on May 12, 2026 at 12:32 am

    I’ve done this recently. I needed to query FlexLM license servers, and discover what licenses were outstanding/available. I didn’t find a reasonable API for this, so I instead just launched lmutil, asked it to query the server, and parsed laboriously through the textual results. A pain, but it worked, and really didn’t take that long to put together.

    Find your copy of lmutil.exe, and run it with either the -a or -i switch, depending on the data you want to gather. Pass it the server and port you wish you query, with the -c switch. Yes, you will need to know the port the FlexLM daemon’s running on. There’s a standard port, but there’s nothing forcing it to run on that port only.

    Since I needed to run this regularly, and I needed to query thousands of daemons, I drove lmutil from an application – something like:

    string portAtHost = "1708@my.server.com";
    string args = String.Format("lmstat -c {0} -a -i", portAtHost);
    ProcessStartInfo info = new ProcessStartInfo(@"lmutil.exe", args);
    info.WindowStyle = ProcessWindowStyle.Hidden;
    info.UseShellExecute = false;
    info.RedirectStandardOutput = true;
    
    using (Process p = Process.Start(info))
    {
        string output = p.StandardOutput.ReadToEnd();
    
        // standard output must be read first; wait max 5 minutes
        if (p.WaitForExit(300000))
        {
            p.WaitForExit(); // per MSDN guidance: Process.WaitForExit Method 
        }
        else
        {
            // kill the lmstat instance and move on
            log.Warn("lmstat did not exit within timeout period; killing");
            p.Kill();
            p.WaitForExit(); // Process.Kill() is asynchronous; wait for forced quit
        }   
        File.WriteAllText("c:\file.lmout", output);
    }
    

    …then you need to parse through the results. Depending what you’re looking for, this could be as simple as splitting the result lines over space characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output
Does anyone have any experience with how well web services build with Microsoft's WCF
Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a
Does anyone have any experience in using compression on their cached data? I understand
Does anyone have any experience migrating from one DBMS to another? If you have
Does anyone have any experience with doing this? I'm working on a Java decompiler
Does anyone have any experience with installing the Visual Studio Isolated Shell and using
Does anyone have any experience that indicates what kind of performance hit a developer
Does anyone have any experience using PHP to send an sms via skype I
Does anyone have any experience creating a skin engine for asp.net MVC? I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.