#!/bin/bash

# Author
#  Joshua Bell
#
# Description
#  Prints out the current disk information of aim and aim2 in bytes and percentages in decimal form
#

df /aim /aim2 -k | tail -2 | awk 'BEGIN {s=1024} {print strftime("%FT%T"), "Drive:", \
	substr($6,2), "Size:", $2*s, "Used:", $3*s, "Available:", $4*s, "Usage:", $3/$2, "Free:", $4/$2}'\
	>> /aim/logs/elk/filesystem.log

# Sample Output
#  2016-09-04T00:18:41 Drive: aim Size: 19791209299968 Used: 1003891982 Available: 9752289476608 Usage: 0.507241 Free: 0.492759
#  2016-09-04T00:18:41 Drive: aim2 Size: 8796093022208 Used: 729196947 Available: 1504123551744 Usage: 0.829001 Free: 0.170999
