<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=LSF_Matlab_ELIM</id>
	<title>LSF Matlab ELIM - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=LSF_Matlab_ELIM"/>
	<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=LSF_Matlab_ELIM&amp;action=history"/>
	<updated>2026-05-05T01:25:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=LSF_Matlab_ELIM&amp;diff=2305&amp;oldid=prev</id>
		<title>Michael: Created page with &quot;&lt;syntaxhighlight&gt; #!/usr/bin/perl ####################################################### # # Basic FLEXlm license monitoring script # Platform Computing, Inc # This is an example and un...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=LSF_Matlab_ELIM&amp;diff=2305&amp;oldid=prev"/>
		<updated>2013-05-01T09:32:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight&amp;gt; #!/usr/bin/perl ####################################################### # # Basic FLEXlm license monitoring script # Platform Computing, Inc # This is an example and un...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
#######################################################&lt;br /&gt;
#&lt;br /&gt;
# Basic FLEXlm license monitoring script&lt;br /&gt;
# Platform Computing, Inc&lt;br /&gt;
# This is an example and unsupported.  You need to modify&lt;br /&gt;
# to run in your environment&lt;br /&gt;
#&lt;br /&gt;
#######################################################&lt;br /&gt;
@featurelist = ( &amp;quot;MATLAB&amp;quot; );&lt;br /&gt;
%featurehash = (&amp;quot;MATLAB&amp;quot; =&amp;gt; &amp;quot;matlab&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$| = 1; # flush output buffer&lt;br /&gt;
$featurecnt = 0;&lt;br /&gt;
&lt;br /&gt;
foreach $name (@featurelist) {&lt;br /&gt;
    $featurecnt++;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
while (1) {&lt;br /&gt;
    @input = ();&lt;br /&gt;
    $outstring = &amp;quot;&amp;quot;;&lt;br /&gt;
    $avail_lics = 0;&lt;br /&gt;
    $licserverstatus = 0;&lt;br /&gt;
    if ( $ENV{LSF_MASTER} eq Y ) {&lt;br /&gt;
        # modify the location of where lmstat is and where your license server(s) are&lt;br /&gt;
        open(OUTPUT, &amp;#039;/usr/local/LSF/7.0/linux2.6-glibc2.3-x86_64/etc/lmstat -c \&lt;br /&gt;
                      27010@rhrcsque1:27010@rhrcsque2:27010@acamar \&lt;br /&gt;
                      -f MATLAB |&amp;#039;) or $licserverstatus = 1;&lt;br /&gt;
&lt;br /&gt;
        if ( $licserverstatus == 0 ) {&lt;br /&gt;
            while (&amp;lt;OUTPUT&amp;gt;) {&lt;br /&gt;
            chomp;&lt;br /&gt;
            if ($_ =~ /Users of/) {&lt;br /&gt;
                push(@input, $_);&lt;br /&gt;
            }&lt;br /&gt;
            }&lt;br /&gt;
            close(OUTPUT);&lt;br /&gt;
&lt;br /&gt;
            foreach $name (@featurelist) {&lt;br /&gt;
                $avail_lics = &amp;amp;LicCnt;&lt;br /&gt;
                $outstring .= %featurehash-&amp;gt;{$name}.&amp;quot; &amp;quot;.$avail_lics.&amp;quot; &amp;quot;;&lt;br /&gt;
            };&lt;br /&gt;
&lt;br /&gt;
            print &amp;quot;$featurecnt $outstring\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
            close(OUTPUT);&lt;br /&gt;
&lt;br /&gt;
            foreach $name (@featurelist) {&lt;br /&gt;
                $avail_lics = &amp;amp;LicCnt;&lt;br /&gt;
                $outstring .= %featurehash-&amp;gt;{$name}.&amp;quot; &amp;quot;.&amp;quot;-9999&amp;quot;.&amp;quot; &amp;quot;;&lt;br /&gt;
            };&lt;br /&gt;
&lt;br /&gt;
            print &amp;quot;$featurecnt $outstring\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
        foreach $name (@featurelist) {&lt;br /&gt;
            $outstring .= %featurehash-&amp;gt;{$name}.&amp;quot; &amp;quot;.&amp;quot;0&amp;quot;.&amp;quot; &amp;quot;;&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;$featurecnt $outstring\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    sleep(15);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub LicCnt {&lt;br /&gt;
    my $issued = 0;&lt;br /&gt;
    my $used = 0;&lt;br /&gt;
    my $available = 0;&lt;br /&gt;
    foreach $line (@input) {&lt;br /&gt;
        if ($line =~ /Users of ${name}.+Total of (\d+).+Total of (\d+)/) {&lt;br /&gt;
            $issued = ($issued + $1);&lt;br /&gt;
            $used = ($used + $2);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    $available = $issued - $used;&lt;br /&gt;
    return($available);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael</name></author>
	</entry>
</feed>