X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=clients%2FHP%2Fbin%2Fmonitor_taskbroker;fp=clients%2FHP%2Fbin%2Fmonitor_taskbroker;h=7c30ffe703694356214dccb93d7bc256bc273309;hb=a8c84d2892f07a6863b68a11eb0a4a79ffd71fb5;hp=0000000000000000000000000000000000000000;hpb=95384f94f88aceeb5eef2d322210ba4a438b6512;p=clearscm.git diff --git a/clients/HP/bin/monitor_taskbroker b/clients/HP/bin/monitor_taskbroker new file mode 100644 index 0000000..7c30ffe --- /dev/null +++ b/clients/HP/bin/monitor_taskbroker @@ -0,0 +1,39 @@ +#!/bin/ksh +################################################################################ +# +# File: monitor_taskbroker +# Description: Quick script to monitor the taskbroker/build pool +# Author: Andrew DeFaria (defaria@cup.hp.com) +# Language: Korn Shell +# Modified:: +# +# (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved +# +################################################################################ +me=$(basename $0) + +integer day_of_week=$(date +%w) +integer sleep_time=5*60 + +talktotaskbroker=/usr/eclipse/etc/talktotaskbroker +logfile=/tmp/taskbroker$day_of_week.log + +function get_status { + print "At $(date)" + $talktotaskbroker mstatus +} # get_status + +rm -f $logfile + +print "$me started" +while true; do + if [ $day_of_week -ne $(date +%w) ]; then + day_of_week=$(date +%w) + logfile_old=$logfile + logfile=/tmp/taskbroker$day_of_week.log + print "Continuing in $logfile..." >> $logfile_old + fi + + get_status >> $logfile + sleep $sleep_time +done &