Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
location=<your backup location>
date=`date "+%Y%m%d"`
for name in $(docker ps --format '{{.Names}}'); do
#Backup location per container
backup_location=$location"/"$name
#Make the directory when it doesn't exist
@bruvv
bruvv / synology speed tweaks.md
Last active November 9, 2023 14:36
synology speed tweaks

Note: this was tested and used on DSM5 and partly on 6. Since V7 I am not using this anymore.

Got and ssh into your box. Find what is using swap:

find /proc -maxdepth 2 -path "/proc/[0-9]*/status" -readable -exec awk -v FS=":" -v TOTSWP="$(cat /proc/swaps | sed 1d | awk 'BEGIN{sum=0} {sum=sum+$(NF-2)} END{print sum}')" '{process[$1]=$2;sub(/^[ \t]+/,"",process[$1]);} END {if(process["VmSwap"] && process["VmSwap"] != "0 kB") {used_swap=process["VmSwap"];sub(/[ a-zA-Z]+/,"",used_swap);percent=(used_swap/TOTSWP*100); printf "%10s %-30s %20s %6.2f%\n",process["Pid"],process["Name"],process["VmSwap"],percent} }' '{}' \;  | awk '{print $(NF-2),$0}' | sort -hr | head | cut -d " " -f2-

Update synoinfo.conf to correct memory in MB (https://www.gbmb.org/gb-to-mb) for 8GB: