Script for monitoring the tuner ...
[satune.git] / tunermonitor.sh
1 #!/bin/bash
2
3 #Terminate the script if even one command fails
4 #set -e
5
6 SATSOLVER=sat_solver
7 CSOLVER=runcomptuner
8 MONITOR=tunermonitor
9 SLEEPTIME=10
10 FILE=monitor.log
11
12
13 kill -9 `jobs -ps` &>$FILE
14
15 while true; do
16         date >> $FILE
17         free >> $FILE
18         ps aux | grep $SATSOLVER | grep -v "grep" >> $FILE
19         ps aux | grep $CSOLVER | grep -v "run.sh" | grep -v "grep" >> $FILE
20         ps aux | grep $MONITOR | grep -v "grep" >> $FILE
21         echo "*************************" >> $FILE
22         sleep $SLEEPTIME
23 done