I have an issue that Syncthing recently started utilising the CPU and continuously is performing disk io. I try to set STTRACE to all but have till now not able to set this correctly and catch the output to a file.
I tried to change the /var/packages/syncthing/script/start-stop-status file but till now without success. Anybody tips how to start the daemon to i can set STTRACE and redirect output to a log file ?
Tried that one also, but that seems to fail because there may be a port mapping applied by the synology app. When i start syncthing from the commandline;
sudo su - syncthing
cd /usr/local/syncthing/bin
export STTRACE=all
./syncthing -home=/usr/local/syncthing/var | tee /tmp/synchting.dbg
It does start with debugging output, but the web interface on port 7070 is not reachable.
syncthing@somehost:/usr/local/syncthing/bin$ ./syncthing -home=/usr/local/syncthing/var | tee /tmp/synchting.dbg
2017/10/16 22:33:55.882437 debug.go:39: DEBUG: Enabling lock logging at 100ms threshold
2017/10/16 22:33:55.889751 logfs.go:72: DEBUG: main.go:1163 basic /usr/local/syncthing/var/ MkdirAll . 448 <nil>
2017/10/16 22:33:55.889902 logfs.go:114: DEBUG: main.go:1168 basic /usr/local/syncthing/var/ Stat . {0xc420192680} <nil>
[monitor] 2017/10/16 22:33:55.890133 monitor.go:95: INFO: Starting syncthing
2017/10/16 22:33:55.892935 debug.go:39: DEBUG: Enabling lock logging at 100ms threshold
2017/10/16 22:33:55.900278 logfs.go:72: DEBUG: main.go:1163 basic /usr/local/syncthing/var/ MkdirAll . 448 <nil>
2017/10/16 22:33:55.900660 logfs.go:114: DEBUG: main.go:1168 basic /usr/local/syncthing/var/ Stat . {0xc420192680} <nil>
[start] 2017/10/16 22:33:55.901062 events.go:268: DEBUG: subscribe Unknown
[start] 2017/10/16 22:33:55.901199 events.go:268: DEBUG: subscribe Unknown
[HOVGC] 2017/10/16 22:33:55.917592 main.go:651: INFO: syncthing v0.14.39 "Dysprosium Dragonfly" (go1.9 linux-amd64) teamcity@build.syncthing.net 2017-09-25 06:05:21 UTC
[HOVGC] 2017/10/16 22:33:55.917670 main.go:652: INFO: My ID: HOVGCY5-3ZZMHT4-KXJZMEA-3OCEXYD-YIZNQOF-P3P4J3U-IV2DGSH-DL2WUQG
[monitor] 2017/10/16 22:33:56.386946 internal.go:51: DEBUG: Dialer logging disabled, as no proxy was detected
[HOVGC] 2017/10/16 22:33:56.397676 internal.go:51: DEBUG: Dialer logging disabled, as no proxy was detected
[HOVGC] 2017/10/16 22:33:57.000879 sha256.go:92: INFO: Single thread SHA256 performance is 98 MB/s using minio/sha256-simd (72 MB/s using crypto/sha256).
[HOVGC] 2017/10/16 22:33:57.001028 events.go:231: DEBUG: log 1 Starting map[home:/usr/local/syncthing/var myID:HOVGCY5-3ZZMHT4-KXJZMEA-3OCEXYD-YIZNQOF-P3P4J3U-IV2DGSH-DL2WUQG]
[HOVGC] 2017/10/16 22:33:58.120961 main.go:711: INFO: Hashing performance with weak hash is 84.48 MB/s
[HOVGC] 2017/10/16 22:33:59.233701 main.go:713: INFO: Hashing performance without weak hash is 95.45 MB/s
[HOVGC] 2017/10/16 22:33:59.233757 main.go:719: INFO: Weak hash enabled, as it has an acceptable performance impact.
[HOVGC] 2017/10/16 22:40:40.786859 progressemitter.go:196: DEBUG: progress emitter: updated interval 5s
[HOVGC] 2017/10/16 22:40:40.787906 progressemitter.go:62: DEBUG: progress emitter: timer - looking after 0
[HOVGC] 2017/10/16 22:40:40.787945 progressemitter.go:81: DEBUG: progress emitter: nothing new
[HOVGC] 2017/10/16 22:41:27.057511 leveldb_dbinstance.go:615: DEBUG: db check completed for "cc5it-4e3tl"
[HOVGC] 2017/10/16 22:41:39.448434 set.go:142: DEBUG: loaded sequence for "cc5it-4e3tl": 235972
[HOVGC] 2017/10/16 22:41:39.448629 logfs.go:78: DEBUG: ignore.go:294 basic /volume1/Syncthing/homedir_imedia_imedia/ Open .stignore <nil> open /volume1/Syncthing/homedir_imedia_imedia/.stignore: no such file or directory
[HOVGC] 2017/10/16 22:41:39.448723 sync.go:158: DEBUG: RWMutex held for 58.661254458s. Locked at model/model.go:315 unlocked at model/model.go:317
[HOVGC] 2017/10/16 22:41:39.448946 logfs.go:138: DEBUG: model.go:257 basic /volume1/Syncthing/homedir_imedia_imedia/ Hide .stfolder <nil>
[HOVGC] 2017/10/16 22:41:39.448975 logfs.go:138: DEBUG: model.go:258 basic /volume1/Syncthing/homedir_imedia_imedia/ Hide .stversions <nil>
[HOVGC] 2017/10/16 22:41:39.449000 logfs.go:138: DEBUG: model.go:259 basic /volume1/Syncthing/homedir_imedia_imedia/ Hide .stignore <nil>
[HOVGC] 2017/10/16 22:41:39.449076 model.go:182: INFO: Ready to synchronize "Homedir imedia imedia" (cc5it-4e3tl) (readwrite)
In the file /var/packages/syncthing/scripts/syncthing.sc there seems to be a port forwarding configuration ;
Because I am not convinced you are using the same config. If you started it before while the one managed by the package manager was running, it would have chosen a different port for the UI. Anyways, it does print in normal non-debug logs where the UI is available if its enabled.
Yes, seems so, but when starting from the Package Center it starts within minutes and the web interface becomes available. When starting from the command-line the web interface and service do not become available.
Still prefer to enable STTRACE and logging redirection from the stop-start-status script.
Finally succeeded in enabling STTRACE and redirecting the stdout when starting syncthing from the synology package manager
After changing the line start-stop-daemon -b -o -c ${USER} -S -u ${USER} -k 002 -x env HOME=${CONFIG_DIR} ${SYNCTHING} -- ${SYNCTHING_OPTIONS}
to start-stop-daemon -b -o -c ${USER} -S -u ${USER} -k 002 -x /bin/bash -- -c "env HOME=${CONFIG_DIR} env STTRACE=all ${SYNCTHING} ${SYNCTHING_OPTIONS} > /tmp/syncthing.dbg.log 2>&1"
in /var/packages/syncthing/scripts/start-stop-status
i was able to start synchting through the synology package manager. This can be done from the commandline using de synopkgctl command; /usr/syno/sbin/synopkgctl start syncthing