Subversion Repositories wimsdev

Rev

Rev 12555 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!if obot isin $wims_session
12555 bpr 2
  !exit
20 reyssat 3
!endif
4
 
5
!if seconds notwordof $wims_writable
12555 bpr 6
  wims_writable=$wims_writable classcnt usercnt time seconds
20 reyssat 7
!endif
8
!reset seconds
9
!readdef wimshome/log/classes/.stat
10
# Only checks total users every 15 min.
11
!if $seconds=$empty or $seconds<$wims_nowseconds-900
14384 obado 12
  st_total=!sh cd $wims_home/log/classes\
12555 bpr 13
	  cl=`awk -F, 'NF>2 {print substr($$1,2) "/.userlist"}' .index`\
14
	  cat $$cl | grep -c '^:'
14384 obado 15
  !bound st_total between integer 0 and 100000000 default 0
16
  st_ctotal=!recordcnt wimshome/log/classes/.index
17
  !writefile wimshome/log/classes/.stat classcnt=$st_ctotal\
20 reyssat 18
usercnt=$st_total\
19
time=$wims_now\
20
seconds=$wims_nowseconds
12555 bpr 21
  classcnt=$st_ctotal
22
  usercnt=$st_total
20 reyssat 23
!endif