mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
tweak ec2-cost gateway grep
This commit is contained in:
parent
30cdf3fc0c
commit
d5579e3de0
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ RX_RATE="0.10"
|
||||||
TX_RATE="0.17"
|
TX_RATE="0.17"
|
||||||
|
|
||||||
# Auto detect network interface
|
# Auto detect network interface
|
||||||
IF=`route -n | grep "^0\.0\.0\.0" | tail -n1 | awk '{print $8}'`
|
IF=`route -n | grep "0\.0\.0\.0" | tail -n1 | awk '{print $8}'`
|
||||||
|
|
||||||
# Calculate bandwidth cost
|
# Calculate bandwidth cost
|
||||||
tx_gb=`/sbin/ifconfig "$IF" | grep "TX bytes:" | sed "s/^.*TX bytes://" | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }'`
|
tx_gb=`/sbin/ifconfig "$IF" | grep "TX bytes:" | sed "s/^.*TX bytes://" | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }'`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue