Advertisement
josephxsxn

disk-report.sh

Jun 30th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  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 "\"}]}" }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement