minetest-logmapsize/logmapsize.sh

16 lines
354 B
Bash
Raw Permalink Normal View History

2018-02-01 13:05:51 -08:00
path="" ### Add path to your map.sqlite
interval=1800 ### Log interval
logfile="" ### Define file to log the sizes
if [[ $path = "" ]]; then
2018-02-01 13:10:10 -08:00
echo "ERROR: Open the script and enter the path to the map.sqlite file"
2018-02-01 13:05:51 -08:00
exit
fi
while true
do
getsize=$(du $path | grep -Eo "^[0-9]{1,}")
2018-02-01 13:10:10 -08:00
echo "$(date) -> $(($getsize/1024)) MB" >> $logfile
2018-02-01 13:05:51 -08:00
sleep $interval
done