#!/bin/bash
if [ $# -eq 1 ]; then
  SUFFIX=".$1"
fi
 
# ADD NEW STOP LINES HERE
cp /proc/profile $LOGDIR/analysis/profile.raw.$RUN_NUMBER$SUFFIX 2> /dev/null # readprofile
killall sadc $AUTODIR/sources/sysstat/sar # sar
if [ -e $TMPDIR/schedstat.pid ]; then # schedstat
  PID=`cat $TMPDIR/schedstat.pid` # schedstat
  ps p $PID | grep -q schedstathelper # schedstat
  if [ $? = 0 ]; then # schedstat
    kill $PID # schedstat
  else # schedstat
    killall schedstathelper 2> /dev/null # schedstat
  fi # schedstat
else # schedstat
  killall schedstathelper 2> /dev/null # schedstat
fi # schedstat
cp /proc/profile $LOGDIR/analysis/profile.raw.$RUN_NUMBER$SUFFIX 2> /dev/null # profile

rm $TMPDIR/profilers_running
