dot

packages and services management
Log | Files | Refs | README

commit b289404c68e8ab9526f8099b69654e70aeec3c90
parent 19ee134feb176b3ee41198178d27d70dbe6a4081
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Thu, 27 Jul 2017 21:08:23 +0200

bin/monitor: daemon mode with a '-d delay' flag

Diffstat:
Mbin/monitor | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/monitor b/bin/monitor @@ -20,8 +20,8 @@ case "$(uname)" in (Solaris) mem=free cpu=id bi='' bo='' b="$disks" ;; esac -[ $# = 0 ] && while : -do vmstat $((60 * 15)) 2 | +[ $# = 2 ] && [ "$1" = -d ] && while : +do vmstat "$2" 2 | awk -v mem="$mem" -v cpu="$cpu" -v bi="$bi" -v bo="$bo" ' BEGIN { @@ -71,7 +71,7 @@ do diskiov="$diskiov $diskio" storv="$storv $stor" done <<EOF -$(tail -n 120 "$VAR/stat/now") +$(tail -n 80 "$VAR/stat/now") EOF o() { printf '\n\n[ %s ]\n\n' "$*"; }