Page 1 of 28

CLOSED: Amahi Energy Saver

Posted: Sun Dec 12, 2010 1:55 pm
by jayrock
Following this discussion http://forums.amahi.org/viewtopic.php?f=15&t=2024, I have set up a project with the aim to suspend Amahi when it's not used. Please see here: http://code.google.com/p/amahienergysaver/

Summary:

Code: Select all

Running servers when they are not needed can waste a considerable amount of energy. This project aims at sending Amahi server to suspend or poweroff when not needed. To do so, Amahi Energy Saver regularly scans for connected clients. If no client is connected, the system suspends after a configurable period. When the system is to be used again, simply wake it up with WOL (ref. http://en.wikipedia.org/wiki/Wake-on-LAN). There are many tools to generate WOL packets, and it is even possible to wake your server over the internet (good link: http://www.wakeonlan.me/). Part of this project is a Windows client, which allows to wake the server with two mouse clicks.
Please help testing!

Cheers,
jayrock

Re: Amahi Energy Saver

Posted: Mon Dec 13, 2010 6:57 am
by bigfoot65
I will give it a shot and see how it works. I presume this will work with minimal changes if any to the HDA.

Re: Amahi Energy Saver

Posted: Mon Dec 13, 2010 7:08 am
by jayrock
Should work with no changes at all, it's OS functions that I use.

One item to do before the beta is including a check if Samba has open files, to take care of the unlikely case that a client is not listed in the client list but still access the files. This will be about the maximum interaction I can forsee right now.

Further down the road I would like to make it an Amahi plug-in. But let's get it stable first.

jayrock

Re: Amahi Energy Saver

Posted: Mon Dec 13, 2010 12:26 pm
by jayrock
Uploaded a new version which interacts with Samba to check if there are open files before shutdown: http://code.google.com/p/amahienergysav ... z&can=2&q=

Been trying to find out what's the best way to install this, I guess I need some custom folder to put the program and some sort of script in rc.d. But I didn't find a comprehensive guide how to do this. Any idea where to start reading?

Cheers

jayrock

Re: Amahi Energy Saver

Posted: Tue Dec 14, 2010 6:20 am
by bigfoot65
If you can script it, we can make it work. It could be packaged as an app potentially. I would be glad to assist with that part.

Re: Amahi Energy Saver

Posted: Tue Dec 14, 2010 11:11 am
by jayrock
Good, thanks. So let me do some more stuff, some more testing and we can probably sort this during January.

Any results from the testing?

/jayrock

Re: Amahi Energy Saver

Posted: Tue Dec 14, 2010 12:24 pm
by bigfoot65
Sorry, had not gotten a chance to test yet. Was a crazy day yesterday. Hope to try it tonight.

Re: Amahi Energy Saver

Posted: Tue Dec 14, 2010 1:55 pm
by jayrock
No worries. Just being curious.

Re: Amahi Energy Saver

Posted: Mon Dec 20, 2010 7:48 am
by jayrock
Hi,

I've uploaded a new build: http://code.google.com/p/amahienergysav ... z&can=2&q=

This one should have all the features working. What's definitely missing is:

- installation routine as daemon
- GUI for configuration
- broader testing

Apart from a neccessary code cleanup I'm wondering if I should port this to C++. As mentioned the tool is currently written in C#, and my impression is that support under Linux is not that excellent. On the other hand, I haven't used C++ for some 10 years and why change if when it's working. Any opinions?

Cheers,

jayrock

PS: I'm surprised that there seems to be very little interest in this kind of solution. Is it just me who thinks that automatic suspend and wakeup is a useul feature? Feeback is welcome.

Re: Amahi Energy Saver

Posted: Mon Dec 20, 2010 9:04 am
by bigfoot65
I still have not tested. I will though, honest. I am sure this is a useful feature.