Subversion Repositories wimsdev

Rev

Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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