From: Dan White Date: Tue, 21 Aug 2018 21:14:55 +0000 (-0500) Subject: timeSampler: stdout information X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=04c38e61867e43ecb7b282aa7d81d3a1783582da;p=pubbin.git timeSampler: stdout information --- diff --git a/timeSampler b/timeSampler index 4ec13af..5f015fc 100755 --- a/timeSampler +++ b/timeSampler @@ -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