daily pastebin goal
21%
SHARE
TWEET

disk-report.sh

josephxsxn Jun 30th, 2017 (edited) 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #Report Disk Space per Mount
  3. timstim=$(date -u)
  4. echo $timstim
  5. df -H | egrep -v '^Filesystem|cdrom' | awk '{ print "{\"TIMSTIM\" : \"'"$timstim"'\", \"DISK\" : [{\"VOLUME\" : \"" $1 "\", \"STORAGE_PERCENT_USED\" :\"" $5 "\"}]}" }'
  6. df -i | egrep -v '^Filesystem|cdrom' | awk '{ print "{\"TIMSTIM\" : \"'"$timstim"'\", \"DISK\" : [{\"VOLUME\" : \"" $1 "\", \"INODES_PERCENT_USED\" :\"" $5 "\"}]}" }'
RAW Paste Data
Top