Last active
December 24, 2015 01:03
-
-
Save djosephsen/274dfff241cd5ee87a0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NET=$1 | |
MOUNT=$2 | |
PRICE[5]='.30' | |
PRICE[10]='.25' | |
PRICE[15]='.20' | |
PRICE[30]='.15' | |
PRICE[60]='.10' | |
PRICE[300]='.5' | |
CPU=$((${CPU}*8)) | |
CPU=$((${CPU}+3)) #1/5/15 min load avg | |
NET=$((${NET}*8)) | |
MOUNT=$((${MOUNT}*17)) | |
T="$((${NET}+${MOUNT}+21))" | |
echo "${T} Metrics" | |
echo "5 seconds: $(echo ${T}*${PRICE[5]}|bc -l)" | |
echo "10 seconds: $(echo ${T}*${PRICE[10]}|bc -l)" | |
echo "15 seconds: $(echo ${T}*${PRICE[15]}|bc -l)" | |
echo "30 seconds: $(echo ${T}*${PRICE[30]}|bc -l)" | |
echo "60 seconds: $(echo ${T}*${PRICE[60]}|bc -l)" | |
echo "300 seconds: $(echo ${T}*${PRICE[300]}|bc -l)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment