Last active
December 3, 2021 18:27
-
-
Save klutchell/24e28eee188d9c7cecfb1882d376c0bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull alpine image for the correct platform (avoid pulling the wrong platform on Pi Zero) | |
balena pull alpine --platform linux/arm/v6 | |
# Run inotifywatch to gather filesystem access statistics for 5m | |
balena run --rm -it -v /mnt/data:/mnt/data:ro alpine sh -c \ | |
'apk add --no-cache inotify-tools && /usr/bin/inotifywatch -v -t 300 -r /mnt/data' | |
# Run iostat with 5 min intervals | |
balena run --rm --privileged alpine iostat -z -k -t -d 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop all user services via the dashboard stop icons | |
# Stop the supervisor | |
systemctl stop update-balena-supervisor.timer | |
systemctl stop balena-supervisor.service | |
# Extend engine healthcheck to 1h intervals | |
mkdir -p /run/systemd/system/balena.service.d | |
cat << EOF > /run/systemd/system/balena.service.d/override.conf | |
[Service] | |
WatchdogSec=3600 | |
EOF | |
# Reload the daemon | |
systemctl daemon-reload | |
# Check the change has been applied | |
systemctl show balena | grep WatchdogUSec | |
# Restart the service | |
systemctl restart balena | |
# Run inotifywatch to gather filesystem access statistics for 5m | |
balena run --rm -it -v /mnt/data:/mnt/data:ro alpine sh -c \ | |
'apk add --no-cache inotify-tools && /usr/bin/inotifywatch -v -t 300 -r /mnt/data' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment