Hello Erik,
thank you very much for your work and this tool!
I did not knew before, that with 7zip you can extract spk files and check the scripts... I had a look on your scripts, but to be honest I have not understood everything.
I have installed the mail_relaxer-1.0.spk on my DS213 (DSM 4.1) via the package-center. I have tested your tool, but unfortunaly my DS does
not go into hibernate. :/
Maybe you can give me a hint how to debug? Or you have an idea what I do wrong?
Here is my configuation
hibernate is configured with 10min. Of course I have tested before with switched off mailserver, that the system really is going into hibernate mode.
Now, mailserver and mailstation are running. In the roundcube web-interface the system is configurated in a way, that mails are downloaded with pop3 from my freemail account. The mail-clients I have configurated in a way that they get the mails synhronized via IMAP from my mailserver on the DS213. Also Pop3 is allowed for the clients.
I made sure that no client is connected (means: I closed all mail-clients in my home network: on my PC and tablet.) But DS is not going into hibernate.
After 37min I connected via ssh to the DS and I entered the command "ps" to get a little idea what is going on (see output below)
My interpretation of the output is:
relax_mailprocd is running --> good, so the mail_relaxer is installed and running
syno_mailserverd and dovecot are running --> not so good, so it did not work, that the mail_relaxer has switched off the mailserver processes. That's why the DS can not go into hibernate mode.
PID USER VSZ STAT COMMAND
1 root 2976 S init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [events/0]
5 root 0 SW [khelper]
8 root 0 SW [async/mgr]
93 root 0 SW [sync_supers]
95 root 0 SW [bdi-default]
96 root 0 SW [kblockd/0]
102 root 0 SW [ata/0]
103 root 0 SW [ata_aux]
118 root 0 SW [rpciod/0]
126 root 0 SW [kswapd0]
127 root 0 SW [nfsiod]
280 root 0 SW [scsi_eh_0]
282 root 0 SW [scsi_eh_1]
296 root 0 SW [mtdblockd]
325 root 0 SW [kstriped]
336 root 0 SW [md0_raid1]
342 root 0 SW [md1_raid1]
428 root 0 SW [jbd2/md0-8]
429 root 0 SW [ext4-dio-unwrit]
1586 root 0 SW [khubd]
1590 root 0 SW [kethubd]
1649 root 0 SW [ksnapd]
1717 root 0 SW [crypto/0]
1885 root 0 SW [crypto]
1886 root 0 SW [crypto_ret]
1985 root 0 SW [ecryptfs-kthrea]
2518 root 2976 S /sbin/syslogd -S
2523 root 2976 S /sbin/klogd
2617 root 0 SW [md2_raid1]
2856 root 0 SW [kdmflush]
3002 root 8448 S < /usr/syno/bin/findhostd
3179 root 0 SW [jbd2/dm-0-8]
3180 root 0 SW [ext4-dio-unwrit]
3809 root 16912 S scemd
3975 root 0 DW [xhci_thread]
4277 root 0 SW [scsi_eh_2]
4281 root 0 SW [usb-storage]
4509 root 0 SW [usbhid_resumer]
4619 root 2980 S /sbin/getty 115200 console
4639 admin 33756 S /usr/syno/pgsql/bin/postgres -D /var/services/pgsql --config_file=/usr/syno/pgsql/etc/postgresql.conf --hba_file=/usr/syno/pgsql/etc
4641 admin 33756 S postgres: writer process
4642 admin 33756 S postgres: wal writer process
4844 root 8968 S /usr/syno/sbin/hotplugd
4999 root 5436 S /usr/sbin/inetd
5005 root 5436 S /usr/sbin/crond
5013 root 13404 S /usr/syno/sbin/snmpd -Ln -c /usr/syno/etc/snmpd.conf -p /var/run/snmpd.pid udp:161,udp6:161,tcp:161,tcp6:161
5146 root 8272 S /usr/syno/sbin/cupsd -C /usr/local/cups/cupsd.conf
5204 root 12884 S N /usr/syno/sbin/fileindexd
5214 root 27400 S N /usr/syno/sbin/synoindexd
5219 root 26308 S N /usr/syno/bin/synomkthumbd
5309 root 19376 S /usr/syno/sbin/nmbd -D
5343 root 25692 S /usr/syno/sbin/smbd -D
5372 root 25692 S /usr/syno/sbin/smbd -D
5632 root 0 SW< [kslowd000]
5791 root 0 SW< [kslowd001]
6176 root 7468 S /usr/syno/sbin/cnid_metad -l log_error
6181 root 14372 S /usr/syno/sbin/afpd -g guest -c 256 -n DataStation:AFPServer -l default log_error
6437 1 1584 S /sbin/portmap
6440 root 0 SW [lockd]
6441 root 0 SW [nfsd4]
6442 root 0 SW [nfsd]
6443 root 0 SW [nfsd]
6444 root 0 SW [nfsd]
6445 root 0 SW [nfsd]
6468 root 8292 S /usr/sbin/statd
6561 root 8316 S /usr/sbin/mountd -p 892
6628 root 14076 S /usr/syno/bin/rsync --daemon
6659 root 12988 S /usr/syno/bin/synonetbkpd
6751 root 26308 S N /usr/syno/sbin/synomkflvd
6824 root 12472 S /usr/syno/sbin/synosnmpcd
6858 root 11340 S /usr/syno/sbin/sshd
7028 root 13524 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
7786 root 2408 S avahi-daemon: running [DataStation.local]
7960 root 4792 S /usr/sbin/openvpn --daemon --cd /usr/syno/etc/synovpnclient/openvpn --config client_o1367103605
7966 root 0 Z [openvpn]
7967 root 4792 S /usr/sbin/openvpn --daemon --cd /usr/syno/etc/synovpnclient/openvpn --config client_o1367103605
8399 root 1700 S /var/packages/VPNCenter/target/sbin/pptpd -c /usr/syno/etc/packages/VPNCenter/pptp/pptpd.conf -o /usr/syno/etc/packages/VPNCenter/pp
8410 root 51976 S /var/packages/VPNCenter/target/sbin/vpnauthd
8430 root 2976 S /bin/sh /tmp/relax_mailprocd boot_start
8750 root 8180 S N /usr/syno/bin/photostationd
8862 root 11168 S /var/packages/MailServer/target/sbin/dovecot
8865 root 15336 S dovecot-auth
8866 root 9492 S /var/packages/MailServer/target/sbin/syno_mailserverd
8905 dovecot 11064 S pop3-login
8906 dovecot 11064 S pop3-login
8907 dovecot 11064 S pop3-login
8908 dovecot 11072 S imap-login
8909 dovecot 11072 S imap-login
8910 dovecot 11072 S imap-login
9000 root 97712 S /usr/syno/apache/bin/httpd -DHAVE_PHP
9002 nobody 97712 S /usr/syno/apache/bin/httpd -DHAVE_PHP
9003 nobody 97712 S /usr/syno/apache/bin/httpd -DHAVE_PHP
9004 nobody 98056 S /usr/syno/apache/bin/httpd -DHAVE_PHP
9037 root 13764 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
9298 root 13780 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
12708 root 0 SW [flush-9:0]
12709 root 0 SW [flush-253:0]
12821 root 8216 S /usr/sbin/ntpd -p /var/run/ntpd.pid -g
12960 nobody 97712 S /usr/syno/apache/bin/httpd -DHAVE_PHP
12976 root 13772 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
12977 root 13772 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
13051 root 13764 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
13052 root 13764 S /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/httpd.conf-sys
13258 root 14524 S sshd: admin [priv]
13278 root 14656 S sshd: admin@pts/0
13279 admin 5440 S -sh
13684 root 26336 S /usr/syno/sbin/smbd -D
13774 root 2976 S sleep 3
13776 admin 5440 R ps
Where I can add some traces into the relax_mailprocd, that I have a chance to debug your tool? (e.g. some traces to have a look when start or stop commands are performed by the mail_relaxer and also check the return codes of the same commands...) Maybe you have already a debug version available with the trace-outputs?
By the way, I have also some basic questions - in case I need to add some trace outputs:
After adding the traces, can I simply zip it with a zip tool and rename as "apk"? And than I can simply re-install? Or is there a special other process/tooling involved for creating the .apk?
(sorry for this basic question - you see, I have done some little scripting in past, but I am not an linux or synology expert
)
Or: can I simply copy relax_mailprocd on the ds and can I start it from the ssh-console without installing over package center?
what would be the command to start it with which parameters?
Regards,
KlausHa
P.S. one more hint: I usually working on windows xp...