CLOSED: Amahi Energy Saver

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

CLOSED: Amahi Energy Saver

Postby jayrock » Sun Dec 12, 2010 1:55 pm

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

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi Energy Saver

Postby bigfoot65 » Mon Dec 13, 2010 6:57 am

I will give it a shot and see how it works. I presume this will work with minimal changes if any to the HDA.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Mon Dec 13, 2010 7:08 am

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

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Mon Dec 13, 2010 12:26 pm

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

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi Energy Saver

Postby bigfoot65 » Tue Dec 14, 2010 6:20 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Tue Dec 14, 2010 11:11 am

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

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi Energy Saver

Postby bigfoot65 » Tue Dec 14, 2010 12:24 pm

Sorry, had not gotten a chance to test yet. Was a crazy day yesterday. Hope to try it tonight.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Tue Dec 14, 2010 1:55 pm

No worries. Just being curious.

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Mon Dec 20, 2010 7:48 am

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.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi Energy Saver

Postby bigfoot65 » Mon Dec 20, 2010 9:04 am

I still have not tested. I will though, honest. I am sure this is a useful feature.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 2 guests