"Advanced Power Manager" (4DS)

  • Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.

    Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.

    Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier

    Hier geht es zu den Add-ons

Status
Für weitere Antworten geschlossen.

Matthieu

Benutzer
Registriert
03. Nov. 2008
Beiträge
13.222
Reaktionspunkte
88
Punkte
344
Zuletzt bearbeitet:
Soweit ich mir das angeschaut habe, wird da ähnlich verfahren wie in meinem AdminTool, also die DS-Manager-Webseite per wget ferngesteuert.

Itari
 
Ich nehme mal an das er es geschrieben hat und einen automatischen Übersetzter zum posten verwendet hat.

Gruss
TomR
 
Ich nehme mal an das er es geschrieben hat und einen automatischen Übersetzter zum posten verwendet hat.

Gruss
TomR

Manchmal ist es dann besser, auch den Originaltext zu posten ... denn durch den Google-Übersetzen können wir es - falls nötig - dann auch selbst jagen.

Itari
 
mal ne frage zu diesem programm:
kann man damit auch einstellen, das sich die DS einschaltet wenn der pc gestartet wird und ausschaltet, wenn der letzte client ausgeschaltet wird?!
gruß
 
Hat jemand das Problem, dass er jedes mal nach dem Hochfahren eine Benachrichtigung erhält, dass die DS wegen Stromausfall abgeschaltet worden wäre? Ich benutze den einfachren Modus und di Option "shut down only on inactivity".
 
Hat jemand das Problem, dass er jedes mal nach dem Hochfahren eine Benachrichtigung erhält, dass die DS wegen Stromausfall abgeschaltet worden wäre? Ich benutze den einfachren Modus und di Option "shut down only on inactivity".

Ich kann leider Deutsch nicht mehr ... Antwort in Englisch ...

The way I'm doing the "shutdown only on inactivity" is by looking at the network statistics. Then, when no activity is detected, I'm calling "/sbin/poweroff". On my DS209+II, calling /sbin/poweroff makes the led blink, then the DS shut down the normal way, that is by calling the init scripts with the "stop" command.
Maybe it's not the case for your Syno, please try by doing the following:
- log in using the command line (ssh or telnet) as root
- call /sbin/poweroff and see if DS shuts down immediately or goes through the init script sequence.
 
thanks Renaud for your reply and your effort to understand german :)

I tried to execute "/sbin/poweroff" via ssh. If I do it not as root, then nothing happens and I have to press CTRL-X to get back to the shell. When I execute "/sbin/poweroff" as root, then the ssh connection closes and I cannot connect to the webinterface anymore. The Box is still on, as I can tell by the LEDs. I don't know what is going on here. The box shuts down at the time configured wit advanced power manager and reboots too. the mail every morning is anoying though.

edit: after executing "sbin/poweroff" as root over ssh, I tried to shut down the box with a long press of the power button, but this does not work either.

edit2: So I unplug the power cable and after plugging it back in, the box reboots automatically (I configured it to rebbot after loss of power. This time, I get the mail correctly. stating that there was an unexpected power off...
 
Zuletzt bearbeitet:
I remember having releasing quite early a broken release which was making the DS not shut down after upgrade of the application.
I would recommend uninstalling the application, then reinstalling it from Community Package Hub (http://update.10trum.de/packageupdate/getpackages.php).
You may also try executing /sbin/poweroff as root after uninstalling the application to make sure the issue comes from my application.
If this isn't better, please recontact me directly and we will debug it.
 
I had it installed from the cummunity repo, the version was displayed as 2.2.1. I deinstalled it for now and tried "/sbin/poweroff" again as root over ssh. Same result as before: the DS is not reachable over network but is still on. What I don't understand, is the fact that the DS is switched off at the correct time programmed with advanced power manager but when I manually execute /sbin/poweroff it does not.
 
Issues with Advanced Power Manager

Hi Renauld,

I had some issues with advpowermgr-2.3.4b.spk under DSM4.1. Could you please check and comment.

Thanks.

P.S.: BTW, I love your program. (Otherwise I would not have spent the time for fixing these issues ;-).

1) Scheduler.pl never triggered shutdown, because when it came back from sleep for shutdown it always considered the next shutdown time instead of the current time. I changed code in compute_dates_plus_times in Common.pm from:
Rich (BBCode):
if ($date + $time > $start_when) { push ...
to:
Rich (BBCode):
if ($date + $time >= $start_when) { push ...

Now it seems to work, but probably there is a more elegant way of solving this.

Please note that the problem only occured, when "Shutdown only on inactivity" was not activated.

2) Disk activity detection did not work anymore. Reason seems to be that /proc/diskstats uses other names for the drives than expected. I have sda0, sda1 and sda2 (and also sda), but the script seems to search for something like md0, md1 etc.

I changed code in Scheduler.pl from:
Rich (BBCode):
next unless $line =~ m/\d+\s+\d+\s+md\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+/;
to:
Rich (BBCode):
next unless $line =~ m/\d+\s+\d+\s+sda\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+/;

Now it works.
 
Zuletzt bearbeitet:
1) Scheduler.pl never triggered shutdown, because when it came back from sleep for shutdown it always considered the next shutdown time instead of the current time. I changed code in compute_dates_plus_times in Common.pm from:
Rich (BBCode):
if ($date + $time > $start_when) { push ...
to:
Rich (BBCode):
if ($date + $time >= $start_when) { push ...

I integrated this fix in the latest version (available on sourceforge but not yet on http://www.package.10trum.de/). I don't remember exactly how the code works but this seems more appropriate.

2) Disk activity detection did not work anymore. Reason seems to be that /proc/diskstats uses other names for the drives than expected. I have sda0, sda1 and sda2 (and also sda), but the script seems to search for something like md0, md1 etc.

I changed code in Scheduler.pl from:
Rich (BBCode):
next unless $line =~ m/\d+\s+\d+\s+md\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+/;
to:
Rich (BBCode):
next unless $line =~ m/\d+\s+\d+\s+sda\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+/;

Now it works.

What is your exact DS model and could you please dump me a /proc/diskstats. Usually, there are mdX devices and I use them to have a good calculation (when using raid, you would otherwise have twice (or more) the number of writes).
 
Not sure your proposed solution works for (1). I need to think about it deeply because I fear we may enter a spin loop...
Stay tuned.
 
Please test new release (2.3.4c) on sourceforge. Should work now.
The issue that after sleeping up to shutdown time, the new value for shutdown was computed instead of current one.
This only happened when not using the inactivity option.
 
Hi Renaud,

Yes, new release (2.3.4c) works. Thanks a lot!
(And yes, it only happened when not using the inactivity option - which not many people will do because that is the most important feature of the program).

Here is my /proc/diskstats (DS112, DSM4.1-2636):

Rich (BBCode):
   1       0 ram0 0 0 0 0 0 0 0 0 0 0 0
   1       1 ram1 0 0 0 0 0 0 0 0 0 0 0
   1       2 ram2 0 0 0 0 0 0 0 0 0 0 0
   1       3 ram3 0 0 0 0 0 0 0 0 0 0 0
   1       4 ram4 0 0 0 0 0 0 0 0 0 0 0
   1       5 ram5 0 0 0 0 0 0 0 0 0 0 0
   1       6 ram6 0 0 0 0 0 0 0 0 0 0 0
   1       7 ram7 0 0 0 0 0 0 0 0 0 0 0
   1       8 ram8 0 0 0 0 0 0 0 0 0 0 0
   1       9 ram9 0 0 0 0 0 0 0 0 0 0 0
   1      10 ram10 0 0 0 0 0 0 0 0 0 0 0
   1      11 ram11 0 0 0 0 0 0 0 0 0 0 0
   1      12 ram12 0 0 0 0 0 0 0 0 0 0 0
   1      13 ram13 0 0 0 0 0 0 0 0 0 0 0
   1      14 ram14 0 0 0 0 0 0 0 0 0 0 0
   1      15 ram15 0 0 0 0 0 0 0 0 0 0 0
  31       0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0
  31       1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0
  31       2 mtdblock2 0 0 0 0 0 0 0 0 0 0 0
  31       3 mtdblock3 0 0 0 0 0 0 0 0 0 0 0
  31       4 mtdblock4 0 0 0 0 0 0 0 0 0 0 0
  31       5 mtdblock5 0 0 0 0 0 0 0 0 0 0 0
  31       6 mtdblock6 0 0 0 0 0 0 0 0 0 0 0
   8       0 sda 4617 16008 300000 16590 1174 3113 34296 31540 0 20960 48140
   8       1 sda1 2260 6895 241886 9790 616 1232 14784 14040 0 13100 23840
   8       2 sda2 4 118 976 30 0 0 0 0 0 30 30
   8       3 sda3 2323 8666 54266 6650 558 1881 19512 17500 0 12670 24150
   7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
   7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
   7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
   7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
   7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
   7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
   7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
   7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
   7       8 loop8 0 0 0 0 0 0 0 0 0 0 0
   7       9 loop9 0 0 0 0 0 0 0 0 0 0 0
   7      10 loop10 0 0 0 0 0 0 0 0 0 0 0
   7      11 loop11 0 0 0 0 0 0 0 0 0 0 0
   7      12 loop12 0 0 0 0 0 0 0 0 0 0 0
   7      13 loop13 0 0 0 0 0 0 0 0 0 0 0
   7      14 loop14 0 0 0 0 0 0 0 0 0 0 0
   7      15 loop15 0 0 0 0 0 0 0 0 0 0 0
 
Zuletzt bearbeitet:
Thnx.

By the way: I got the impression that the "sda" devices came with DSM4.1.
Before the upgrade, Advanced Power Manager was working fine.
I think I used version 2.2.2 at the time (with inactivity detection).

Do you share that view?
 
Zuletzt bearbeitet:
Status
Für weitere Antworten geschlossen.
 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat