#!/bin/bash
# This is the script to start collection of scheduler statistics
#
# reqparam value Collection interval for scheduler statistics
# optparam value Suffix - an optional string to append to the name of the log file 
#

. /etc/autobench.conf || . functions

if [ $# -lt 1 ]; then
  echo "You must specify the collection interval for scheduler statistics"
  exit 1
fi

while [ -e /proc/schedstat ]; do
	cat /proc/schedstat >> $LOGDIR/analysis/schedstat.$RUN_NUMBER
	echo "" >> $LOGDIR/analysis/schedstat.$RUN_NUMBER$2
	sleep $1
done
