Skip to content

Instantly share code, notes, and snippets.

@fredrike
Created January 14, 2019 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredrike/ee94bc783a86f7898fa2d2b6e9e511c5 to your computer and use it in GitHub Desktop.
Save fredrike/ee94bc783a86f7898fa2d2b6e9e511c5 to your computer and use it in GitHub Desktop.
while true; do (df -m /volume2 /volume3; iostat -m -d sdb|sed -ne "4,4p;4q") | tr -d '\n'| awk '{printf " Status %0.2f% %, %0.2fTB (%s) left @ %0.2fMB/s ETA %s \r", $9/$14, ($14-$9)/1024/1024, strftime("%T", ($14-$9)/$20), $20, strftime("%F %T", systime()+($14-$9)/$20)}'|tee ~/hass/www/custom-lovelace/stat.txt; sleep 15; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment