timeSampler: stdout information
authorDan White <dan@whiteaudio.com>
Tue, 21 Aug 2018 21:14:55 +0000 (16:14 -0500)
committerDan White <dan@whiteaudio.com>
Tue, 21 Aug 2018 21:14:55 +0000 (16:14 -0500)
timeSampler

index 4ec13af9de5cd6fd19c8d7041c8577ada740c191..5f015fcfae2c8b368e67e0efd88aa112022aba81 100755 (executable)
@@ -60,6 +60,9 @@ BACKUPFILE="$HOME/.timeSampler.all"
 # End of configuration
 ########################
 
+thispid=$$
+echo "$thispid" > ~/.timeSampler.pid
+
 
 #index of the last buffer entry
 BUFFER_END=$(($MAXJOBS-1))
@@ -122,6 +125,7 @@ function sampleTask {
     fi
 
     echo "$DATE $ACTIVITY" >> $LOGFILE
+    echo "$DATE $ACTIVITY"
     echo "$HOSTNAME $DATE $ACTIVITY" >> $BACKUPFILE
 }
 
@@ -152,6 +156,8 @@ function fifoPushKillOldest {
     done
     buffer[$BUFFER_END]=$pid
 
+    echo ${buffer[@]}
+
     # Kill the oldest dialog box (which is runnng as a child of the oldest
     # subshell, resulting in a "null" entry in the logfile.
     for j in `jobs -p`; do
@@ -179,9 +185,6 @@ trap cleanup SIGUSR1
 
 
 
-thispid=$$
-echo "$thispid" > ~/.timeSampler.pid
-
 while true; do
     if [[ $(lastActivity) != "null" ]]; then
         $BEEP > /dev/null 2>&1