43 lines
748 B
Text
43 lines
748 B
Text
|
|
fn licencesInUse =
|
||
|
|
(
|
||
|
|
local logFile = openFile "mlijobs.txt"
|
||
|
|
local out = 0
|
||
|
|
local maxOut = -1
|
||
|
|
local maxTimes = #()
|
||
|
|
|
||
|
|
while not EOF logFile do
|
||
|
|
(
|
||
|
|
line = readLine logFile
|
||
|
|
|
||
|
|
if findString line "OUT" != undefined then
|
||
|
|
(
|
||
|
|
out += 1
|
||
|
|
)
|
||
|
|
else
|
||
|
|
(
|
||
|
|
out -= 1
|
||
|
|
)
|
||
|
|
|
||
|
|
if out > maxOut then
|
||
|
|
(
|
||
|
|
maxOut = out
|
||
|
|
maxTimes = #()
|
||
|
|
)
|
||
|
|
|
||
|
|
if out == maxOut then
|
||
|
|
(
|
||
|
|
append maxTimes (filterString line " ")[4]
|
||
|
|
)
|
||
|
|
)
|
||
|
|
format "Maximum simultaneous license use is % at the following times:\n" maxOut
|
||
|
|
|
||
|
|
for time in maxTimes do
|
||
|
|
(
|
||
|
|
format "%\n" time
|
||
|
|
)
|
||
|
|
|
||
|
|
close logFile
|
||
|
|
)
|
||
|
|
|
||
|
|
licencesInUse()
|