Well, it seems like your excessively large drive created a math problem! Appears there are some limits I'm not aware of...
Using your values, the outcome of this math problem = 0
Code:
sdtotal="$((5814347280 / 1048576))"
Had to change tactics, and am now using this, which makes it = 5544
Code:
sdtotal=$(echo "5814347280/1048576" | bc -l | cut -d . -f 1)
I have a test version of RTRMON with this fix implemented... if you wouldn't mind giving it a try, and seeing if you have better results with this? (just ignore the update warnings)
Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/RTRMON/develop/rtrmon.sh" -o "/jffs/scripts/rtrmon.sh" && chmod 755 "/jffs/scripts/rtrmon.sh"