* bin/ec2-cost: speed up route with -n

This commit is contained in:
Dustin Kirkland 2009-02-27 14:04:50 -06:00
commit a2ce0807d1

View file

@ -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 }'`