Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving license check #3485

Open
germa89 opened this issue Oct 16, 2024 · 2 comments
Open

Improving license check #3485

germa89 opened this issue Oct 16, 2024 · 2 comments

Comments

@germa89
Copy link
Collaborator

germa89 commented Oct 16, 2024

@saitade-bh @germa89 @RobPasMue
Hi All - hope I don't open Pandoras Box here but from the standard Ansys installation we can use lmutil to do this. Assuming a MS Win OS the command would be:
"C:\Program Files\ANSYS Inc\v242\licensingclient\winx64\lmutil.exe" lmstat -f meba -c 1055@127.0.0.1

You would replace 127.0.0.1 with the hostname or IP address of the license server. This could be found in the C:\Program Files\ANSYS Inc\Shared Files\Licensing\ansyslmd.ini file.

You would have to parse out the output to get the number available (the command gives more than a simple number). And I've no idea how to issue from Python (was playing around with the subprocess library but did not quite get it to work). But maybe this is enough of a starting point.

A word of caution - if you do create something please, please build in a wait/pause feature. We don't want to be pinging the license server with thousands of requests per minute/second/whatever. That way lies a denial-of-service attack. If you are laughing this advice off it comes from real world direct technical support experience.

lmstat is getting the license information from the license server without regard to the license options file, if one exists. The option file rules only kick in on check-out...at least that is my understanding.

lmutil is a FlexNet application (licensing), not Ansys Inc.

Mike

Originally posted by @mikerife in #3448 (comment)

@germa89
Copy link
Collaborator Author

germa89 commented Oct 16, 2024

Thank you @mikerife

@germa89
Copy link
Collaborator Author

germa89 commented Oct 16, 2024

I think this method could probably replace the current license check based on reading the file licdebug log file and/or using ansysli_util.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant