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

  • Home
  • SEARCH
  • 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
  • 1 View
  • 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

Ask A Question

Stats

  • Questions 135k
  • Answers 135k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What's your opinion in handling exceptions within a thread's execution?… May 12, 2026 at 7:02 am
  • Editorial Team
    Editorial Team added an answer Here is the full list of commands you can execute.… May 12, 2026 at 7:02 am
  • Editorial Team
    Editorial Team added an answer You could simply use JQuery to set a hidden form… May 12, 2026 at 7:02 am

Related Questions

I'm designing a database of statistics about the operation of mechanical equipment. Each batch
We're building an app that stores hours of operation for various businesses. What is
I have a web site that uses Microsoft Indexing Service to index and query
Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.