Subversion Repositories ALCASAR

Rev

Rev 2286 | Rev 2317 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2286 Rev 2287
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-activity_report.sh 2286 2017-06-20 08:32:30Z tom.houdayer $
2
# $Id: alcasar-activity_report.sh 2287 2017-06-20 08:52:10Z tom.houdayer $
3
#
3
#
4
# Create an activity report for ALCASAR every week (sunday at 5.35 pm --> see cron.d).
4
# Create an activity report for ALCASAR every week (sunday at 5.35 pm --> see cron.d).
5
# We read configuration files and logs to create cool charts.
5
# We read configuration files and logs to create cool charts.
6
# Written by Raphaël PION, Rexy & Tom HOUDAYER
6
# Written by Raphaël PION, Rexy & Tom HOUDAYER
7
 
7
 
Line 330... Line 330...
330
	#find data
330
	#find data
331
	#count every BL website consulted since DAYS_AGO
331
	#count every BL website consulted since DAYS_AGO
332
	DATE_1=$C_TS
332
	DATE_1=$C_TS
333
	DATE_2=$((DATE_1-$STEP_TS))
333
	DATE_2=$((DATE_1-$STEP_TS))
334
 
334
 
-
 
335
	touch $TMP_BL_WEEK
-
 
336
 
335
	for LINE in $(cat $TMP_BL)
337
	for LINE in $(cat $TMP_BL)
336
	do
338
	do
337
		TS_FILE=$(echo $LINE | cut -d':' -f1)
339
		TS_FILE=$(echo $LINE | cut -d':' -f1)
338
		#select only elements between DATE_1 and DATE_2
340
		#select only elements between DATE_1 and DATE_2
339
		if [ "$TS_FILE" -le "$DATE_1" -a "$TS_FILE" -ge "$DATE_2" ]
341
		if [ "$TS_FILE" -le "$DATE_1" -a "$TS_FILE" -ge "$DATE_2" ]