Difference between revisions of "Amahi Energy Saver"

From Amahi Wiki
Jump to: navigation, search
Line 3: Line 3:
 
==Initial setup==
 
==Initial setup==
  
1. Copy the tar.gz file from the download page to some folder and unpack it with tar -zxf filename.
+
1. Copy the tar.gz file from the download page to some folder and unpack it with <code>tar -zxf filename</code>.
  
2. Open a terminal, change to that folder and get superuser rights by running "su"
+
2. Open a terminal, change to that folder and get superuser rights by running <code>su</code>
  
3. As root, run "./aes-install.sh"
+
3. As root, run <code>./aes-install.sh</code>
  
4. As root, run "service aes start" to start the service, and "chkconfig --add aes on" to make the service start on boot. Be careful, when you start the service the sytem MAY go to sleep when you don't expect it.
+
4. As root, run <code>service aes start</code> to start the service, and <code>chkconfig --add aes on</code> to make the service start on boot. Be careful, when you start the service the sytem MAY go to sleep when you don't expect it.
  
5a. Navigate to /usr/bin/aes and run "./aes.rb --shownetworkhosts" to show and select to add any currently active network host to the list of monitored hosts. Run "./aes.rb --showmonitoredhosts" to check the monitored hosts and delete the ones you want to remove.
+
5. Navigate to <code>/usr/bin/aes</code> and run <code>./aes.rb --shownetworkhosts</code> to show and select to add any currently active network host to the list of monitored hosts. Run <code>./aes.rb --showmonitoredhosts</code> to check the monitored hosts and delete the ones you want to remove.
  
5b. For experts: As root, navigate to /usr/bin/aes and have a look at the log file. Modify aes_monitoredhosts to add more host to be monitored. When you are finished and have saved the file, you may run "service aes restart" and check the file again. If it looks ok, aes has understood it correctly, otherwise edit again.
 
  
 
==CLI description==
 
==CLI description==
http://code.google.com/p/amahienergysaver/wiki/UsingTheCLI
+
./aes.rb --showmonitoredhosts
 +
Show a list of all hosts which are monitored by AES, and also allows to delete hosts from the list. If these hosts are up and running (and respond to ping), the server does not suspend.
 +
 
 +
./aes.rb --shownetworkhosts
 +
Lists the hosts found in the network and gives the user the choice to add them. This is useful to quickly fill the list of monitored hosts.
 +
 
 +
./aes.rb --addhost macadress
 +
Manually add a host to the list of monitores hosts. Observe the MAC address format, which has to be XX:XX:XX:XX:XX:XX. Example is 12:34:56:78:90:ab
 +
 
 +
./aes.rb --showcalendar
 +
Lists the current calendar entries. Calendar entries define times when the server does not suspend. Also, the server will be woken up at the beginning of a calendar entry.
 +
 
 +
./aes.rb --addcalendar startdate starttime stopdate stoptime
 +
Use this command to add an entry to the calendar. Format of stardate/stopdate: YYYY-MM-DD Format of starttime/stoptime: hhm:mm. Eg. amahienergysaver --addcalendar 2010-12-20 15:00 2010-12-20 16:00 will keep the server awake on Dec 20th, 2010 from 15 to 16 hrs (3 to 4 pm). The server will also wake up at 15 hrs if it is suspended.
 +
 
 +
./aes.rb --help
 +
Displays command line help

Revision as of 17:16, 8 January 2011

General information is here: http://code.google.com/p/amahienergysaver/

Initial setup

1. Copy the tar.gz file from the download page to some folder and unpack it with tar -zxf filename.

2. Open a terminal, change to that folder and get superuser rights by running su

3. As root, run ./aes-install.sh

4. As root, run service aes start to start the service, and chkconfig --add aes on to make the service start on boot. Be careful, when you start the service the sytem MAY go to sleep when you don't expect it.

5. Navigate to /usr/bin/aes and run ./aes.rb --shownetworkhosts to show and select to add any currently active network host to the list of monitored hosts. Run ./aes.rb --showmonitoredhosts to check the monitored hosts and delete the ones you want to remove.


CLI description

./aes.rb --showmonitoredhosts Show a list of all hosts which are monitored by AES, and also allows to delete hosts from the list. If these hosts are up and running (and respond to ping), the server does not suspend.

./aes.rb --shownetworkhosts Lists the hosts found in the network and gives the user the choice to add them. This is useful to quickly fill the list of monitored hosts.

./aes.rb --addhost macadress Manually add a host to the list of monitores hosts. Observe the MAC address format, which has to be XX:XX:XX:XX:XX:XX. Example is 12:34:56:78:90:ab

./aes.rb --showcalendar Lists the current calendar entries. Calendar entries define times when the server does not suspend. Also, the server will be woken up at the beginning of a calendar entry.

./aes.rb --addcalendar startdate starttime stopdate stoptime Use this command to add an entry to the calendar. Format of stardate/stopdate: YYYY-MM-DD Format of starttime/stoptime: hhm:mm. Eg. amahienergysaver --addcalendar 2010-12-20 15:00 2010-12-20 16:00 will keep the server awake on Dec 20th, 2010 from 15 to 16 hrs (3 to 4 pm). The server will also wake up at 15 hrs if it is suspended.

./aes.rb --help Displays command line help