Loading bin/jenkins-shell-monitor.sh +4 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cleanup_all() { # main # main_loop() { # most data is updated every fifteen minutes # most data is updated every 23 minutes in the outer loop ps fax > $PSFAX LSOF=$(lsof -n | wc -l) SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ -mindepth 1 | wc -l) Loading Loading @@ -102,6 +102,7 @@ main_loop() { ) > $DISKSTATS SOME_AGE="$(date -u)" for i in $SEQ1 ; do # the inner loop is run more often clear LOAD="$(uptime | rev | cut -d ',' -f1-3 | rev | cut -d ':' -f2-|xargs echo)" INTEGER_LOAD=$(echo $LOAD | cut -d '.' -f1) Loading Loading @@ -162,7 +163,7 @@ main_loop() { cat $DISKSTATS free -h | cut -b1-47 echo echo "some information was gathered at $SOME_AGE. (updated every 15min)" echo "some information was gathered at $SOME_AGE. (updated every 23min)" echo "some other information at around $(date -u). (updated every 90sec)" for j in $SEQ2 ; do echo -n "..." Loading @@ -175,7 +176,7 @@ main_loop() { export LANG=C trap cleanup_all INT TERM EXIT # initialize internal loop variables SEQ1=$(seq 1 10) # outer loop SEQ1=$(seq 1 15) # outer loop SEQ2=$(seq 1 20) # inner loop # static colors FOREGROUND_COLOR=$(tput sgr0) Loading Loading
bin/jenkins-shell-monitor.sh +4 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cleanup_all() { # main # main_loop() { # most data is updated every fifteen minutes # most data is updated every 23 minutes in the outer loop ps fax > $PSFAX LSOF=$(lsof -n | wc -l) SCHROOT_SESSIONS=$(find /var/lib/schroot/session/ -mindepth 1 | wc -l) Loading Loading @@ -102,6 +102,7 @@ main_loop() { ) > $DISKSTATS SOME_AGE="$(date -u)" for i in $SEQ1 ; do # the inner loop is run more often clear LOAD="$(uptime | rev | cut -d ',' -f1-3 | rev | cut -d ':' -f2-|xargs echo)" INTEGER_LOAD=$(echo $LOAD | cut -d '.' -f1) Loading Loading @@ -162,7 +163,7 @@ main_loop() { cat $DISKSTATS free -h | cut -b1-47 echo echo "some information was gathered at $SOME_AGE. (updated every 15min)" echo "some information was gathered at $SOME_AGE. (updated every 23min)" echo "some other information at around $(date -u). (updated every 90sec)" for j in $SEQ2 ; do echo -n "..." Loading @@ -175,7 +176,7 @@ main_loop() { export LANG=C trap cleanup_all INT TERM EXIT # initialize internal loop variables SEQ1=$(seq 1 10) # outer loop SEQ1=$(seq 1 15) # outer loop SEQ2=$(seq 1 20) # inner loop # static colors FOREGROUND_COLOR=$(tput sgr0) Loading