c=1

stopfile=/data/seestats/stop_lt
runfile=/data/seestats/run_st

# while [ 1 ]
# do

	if [ -f "$runfile" ]
	then
		echo "$runfile found."
		echo "short term session active ..."
		# sleep 60

	else 	
		echo "---------------"
		echo "Long term $c times" $(date +%s) $(date)  	


		# 1 hour
		# More delay may lead to loss of valuable data 
		# (e.g not sure whether all dmesg logs will be captured)
		# <Needs testing> 
		# sleep 3600 

		echo "Snapshot before"		
		/data/seestats/scripts_set4.sh
		/data/seestats/scripts_set3.sh
		echo "Snapshot after"
		/data/seestats/scripts_set4.sh


		# if [ -f "$stopfile" ]
		# then
		#	echo "$stopfile found."
		# break
		# fi

		# (( c++ ))
	fi
# done
