3
# Simple keep-alive script echoing the date on stdout
4
# This is needed to prevent the builders from killing a build
5
# staying too long without producing outputs, like while
6
# linking chromium with ld-bfd.
9
# keep-alive.sh start &
14
# Fabien Tassin <fta@sofaraway.org>
15
# License: GPLv2 or later
18
LOCK=/var/tmp/k-a.lock
28
if [ ! -f $LOCK ] ; then
32
if [ $((T2-T1)) -ge $LINTERVAL ] ; then
34
FREE=$(free -mo | cut -c1-6,30-40 | tail -2 | awk '{ print "Free " $1 " " $2 "M" } ' | tr '\n' ' ')
35
echo "[keep-alive] $(date) ($((DELTA/60)) min) [ $FREE]"
48
echo "Usage: $(basename $0) [start|stop]"