Viewing contents of file '../idllib/deutsch/local/idluse.pro'
;+
; NAME:
; IDLUSE
; PURPOSE:
; This program sifts through the lmgrd log and extracts some useful info.
; The info is now less useful since newer versions of lmgrd provide even
; less info in the log.
; CALLING SEQEUNCE:
; .run idluse
;-
list=['/host/bluemoon/usr2/rsi/idl_5/log/idluse.log', $
findfile('/host/bluemoon/usr2/rsi/idl_5/log/idluse970[6-9]*'), $
findfile('/host/bluemoon/usr2/rsi/idl_5/log/idluse971*'), $
findfile('/host/bluemoon/usr2/rsi/idl_5/log/idluse98*')]
; list=['/host/dione/usr/local/rsi/idl_4/log/idluse.log']
totuse=0.0
lin=''
usernames=strarr(100) & totusers=0
usertotuse=fltarr(100)
for i=0,n_elements(list)-1 do begin
openr,1,list(i)
print,'Processing ',list(i)
while not EOF(1) do begin
readf,1,lin
if (strpos(lin,'IN:') ne -1) then begin
pos1=strpos(lin,'idl ')+4
if (pos1 eq 3) then pos1=strpos(lin,'idl" ')+5
user=strmid(lin,pos1,20)
user=strmid(user,0,strpos(user,'@'))
j=0 & match=-1
while (usernames(j) ne '') do begin
if (user eq usernames(j)) then match=j
j=j+1
endwhile
if (match eq -1) then begin
usernames(totusers)=user
match=totusers & totusers=totusers+1
endif
usertotuse(match)=usertotuse(match)+1
totuse=totuse+1
endif
endwhile
close,1
endfor
srt=sort(usertotuse(0:totusers-1))
for i=0,totusers-1 do begin
print,usernames(srt(i)),total(usertotuse(srt(i))), $
total(usertotuse(srt(i)))/totuse*100.0,'%',format='(a10,i10,f10.1,a)'
endfor
print,'TOTAL',totuse,format='(a10,i10)'
FINISH:
end