File: stat

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (23 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
!if obot isin $wims_session
  !exit
!endif

!if seconds notwordof $wims_writable
  wims_writable=$wims_writable classcnt usercnt time seconds
!endif
!reset seconds
!readdef wimshome/log/classes/.stat
# Only checks total users every 15 min.
!if $seconds=$empty or $seconds<$wims_nowseconds-900
  st_total=!sh cd $wims_home/log/classes\
	  cl=`awk -F, 'NF>2 {print substr($$1,2) "/.userlist"}' .index`\
	  cat $$cl | grep -c '^:'
  !bound st_total between integer 0 and 100000000 default 0
  st_ctotal=!recordcnt wimshome/log/classes/.index
  !writefile wimshome/log/classes/.stat classcnt=$st_ctotal\
usercnt=$st_total\
time=$wims_now\
seconds=$wims_nowseconds
  classcnt=$st_ctotal
  usercnt=$st_total
!endif