PDA

View Full Version : "lmutil lmstat" equivalent?



bplett
04-01-2015, 01:06 PM
I'm writing some very simple software to query our license manager for the status of licenses. "lmutil lmstat -c -a" provides pretty much exactly what I need, and my software presently shells out, runs that command, and parses the output. However, I'd really prefer a more elegant solution (I hate parsing text!). For example, I'd prefer to be making the same calls to the server as "lmutil" is in this case. If "lmutil" is operating against a web service, I'd MUCH prefer to do the same, especially if the interaction is via SOAP or JSON. Is there any kind of API or WSDL available? Do we have to do anything on the server to allow this kind of interaction?

Thanks!
Brad.

odenbach
12-15-2015, 08:19 AM
I'm writing some very simple software to query our license manager for the status of licenses. "lmutil lmstat -c -a" provides pretty much exactly what I need, and my software presently shells out, runs that command, and parses the output. However, I'd really prefer a more elegant solution (I hate parsing text!). For example, I'd prefer to be making the same calls to the server as "lmutil" is in this case. If "lmutil" is operating against a web service, I'd MUCH prefer to do the same, especially if the interaction is via SOAP or JSON. Is there any kind of API or WSDL available? Do we have to do anything on the server to allow this kind of interaction?

Thanks!
Brad.

If you like the programing language Perl, please have a look at

http://search.cpan.org/~odenbach/Flexnet-lmutil-1.4/lib/Flexnet/lmutil.pm

This module takes over the process of parsing the lmstat output and creates a nice object which is much more convenient to e.g. create web pages with.

Cheers,

Christopher