From 70a7a62c1f326e593bc48d63a4a51c3c039bbfd0 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Wed, 31 Aug 2011 10:31:46 -0600 Subject: [PATCH] Use default values for disk pct full and mb free. --- bin/pt-collect | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/pt-collect b/bin/pt-collect index 0f2fa4ad..376d784d 100755 --- a/bin/pt-collect +++ b/bin/pt-collect @@ -16,8 +16,8 @@ usage() { # Make sure the disk isn't getting too full. Exit if the disk is more than $1 # percent full, or there is less than $2 megabytes of free space on $3 drive. check_disk_space() { - PCT="$1" - MB="$2" + PCT=${1:-"100"} + MB=${2:-"0"} DEST="$3" avail=$(df -m -P "${DEST}" | awk '/^\//{print $4}'); full=$(df -m -P "${DEST}" | awk '/^\//{print $5}' | sed -e 's/%//g'); @@ -339,11 +339,11 @@ Collect strace data. =item -f PERCENT -Exit if the disk is more than this percent full. +Exit if the disk is more than this percent full (default 100). =item -m MEGABYTES -Exit unless there are this many megabytes free disk space. +Exit if there are less than this many megabytes free disk space (default 0). =item -p PREFIX