|
our systems folk use a 'simple' line to let them know how many
licenses are checked out to how many we have total: lmutil lmstat -a -c <port@license server> | grep "Users of nuke_i" | awk '{print "Nuke:\t" $11 "/" $6}' of course, "lmutil lmstat -a -c <port@license server>" is the part that you are probably looking for so you can do whatever you want with that output, for example (assuming communicate doesn't lock): import subprocess p = subprocess.Popen(['lmutil', 'lmstat', '-a', '-c', 'port@yourLicenseServer'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() output = out.strip().split('\n') for l in output: if 'Users of nuke_r' in l: renderLine = l break issued = '' used = '' for n in renderLine.split(): if n.isdigit(): if not issued: issued = n used = n if used==issued: sys.exit('No available Nuke render licenses') jrab On 01/05/2015 09:29 AM, Timm Wagener wrote:
|
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
