You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First and foremost, thanks for this great tool. It has gone a long way in replacing our old perl based solution. The one question I had was related to distributed license servers. If the license pool is split between multiple servers (in my case 6), is there a way to poll all servers, or craft a license file for input that would allow for pulling the usage of all servers. Running the tool now, it seems that only a couple of the servers are responding to the lmutil lmstat -f command rather than all of them, but if I use the -c switch and include the path to a locally stored lic file that is used on one of the servers that isn't responding the status is returned. Any guidance you could provide would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
I think I was able to accomplish what I needed by using the following changes to the code. Please let me know if you see that this will cause an issue or not, it seems to be working.
def get_lmstatus(configs):
# grab lmutil license manager status output
# lic_file = configs['licfile']
lic_files = configs['licfile'].split('|')
return_result = ''
for lic_file in lic_files:
if op.exists(lic_file):
command = 'lmutil lmstat -c "{}" -a -i'.format(lic_file)
print(command)
else:
command = 'lmutil lmstat -a -i'
result = subprocess.run(command, stdout=subprocess.PIPE)
return_result = return_result + result.stdout.decode('utf-8')
return return_result
Then in the config file I separate all the paths with a | symbol to split on in the licfile variable.
@jneilliii You are most welcome. I'd suggest using ; as the path separator since this is the default separator in Windows. And yeah feel free to adjust the code to grab stats from multiple servers and send a PR back for the changes.
First and foremost, thanks for this great tool. It has gone a long way in replacing our old perl based solution. The one question I had was related to distributed license servers. If the license pool is split between multiple servers (in my case 6), is there a way to poll all servers, or craft a license file for input that would allow for pulling the usage of all servers. Running the tool now, it seems that only a couple of the servers are responding to the
lmutil lmstat -f
command rather than all of them, but if I use the-c
switch and include the path to a locally stored lic file that is used on one of the servers that isn't responding the status is returned. Any guidance you could provide would be greatly appreciated.The text was updated successfully, but these errors were encountered: