From a2ce0807d15720fd8262da9ea287fb46defcbdad Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 27 Feb 2009 14:04:50 -0600 Subject: [PATCH] * bin/ec2-cost: speed up route with -n --- bin/ec2-cost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ec2-cost b/bin/ec2-cost index 0fa2e507..bcaa9bfc 100755 --- a/bin/ec2-cost +++ b/bin/ec2-cost @@ -58,7 +58,7 @@ RX_RATE="0.10" TX_RATE="0.17" # Perhaps should auto detect this? -IF=`route | grep "^default" | awk '{print $8}'` +IF=`route -n | grep "^default" | awk '{print $8}'` # Calculate bandwidth cost tx_gb=`/sbin/ifconfig "$IF" | grep "TX bytes:" | sed "s/^.*TX bytes://" | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }'`