LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-21-2009, 07:59 PM   #1
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Rep: Reputation: 15
Automating a server to turn on and off??


Hi all

I know that servers are meant to be going continually but at home here I am trying to save on electricity use and presently I have 3 servers running 24-7.

Is it possible to automate a server to come on at a certain time and shut down at a certain time automatically??

I'd love some help or advice if it is possible.
I'm not a newbie to Linux, but I'm no expert either

Any help will be thankfully and gladly accepted

Last edited by Peppercorn; 10-21-2009 at 08:00 PM. Reason: me being dumb
 
Old 10-21-2009, 09:53 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
Well to shutdown you could us a cronjob.
For starting the computer you could try using Wake On Lan feature, if present.

http://en.wikipedia.org/wiki/Wake-on-LAN
 
Old 10-22-2009, 12:39 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Some BIOSes have the option to wake a system up at a certain time.

And else a simple timer clock in the server's powercord; you know, those old mechanical ones where you put little pins in to set starttime and endtime. Only put a pin in for the starttime.
 
Old 10-24-2009, 02:52 AM   #4
Peppercorn
Member
 
Registered: Sep 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks guys

Some good ideas there thanks
 
Old 10-24-2009, 11:16 AM   #5
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
I have played with various combinations of power-down, suspend and the BIOS RTC wake-up features. Testing the BIOS is critical and a real pain to debug: Set the alarm, shutdown, wait (an hope) for the machine to power up again and, hopefully, not shut down again immediately. Also consider what would happen if there is a power outage at wakeup time.

MythTV can be configured to shut the machine down, setting the alarm to wake the machine up N minutes before the next scheduled recording, or a fixed time, whichever comes first. I have used it and it works reliably once the wrinkles have been ironed out. They have a number of Wiki pages on the subject under "shutdown/wakeup".

I have my 04:00 "overnight batches" set a flag meaning "don't shut down yet", run the batches, then remove the flag and, optionally, set the RTC alarm to wake up at 03:58, just in time to run the next batch and shut down again. The BIOS is set to power the machine up if power is resumed. Great for vacations. Ran reliably for 3 months unattended without missing a TV recording.

The interface you want is either /proc/acpi/alarm (older) or /sys/class/rtc/rtc0/wakealarm (since kernel-2-6-22). The MythTV page is at http://www.mythtv.org/wiki/ACPI_Wakeup and has plenty of examples.

Have fun,
--DaveG
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble automating rsync Mac OS 10.5 to Synology (BusyBox) Server tenraek Linux - Server 0 03-15-2009 02:38 PM
How to Turn on Ftp server, gosee Linux - Server 1 11-25-2008 10:42 PM
How to turn my Server into a DHCP Server? felton57 Linux - Networking 2 06-06-2008 10:51 PM
Turn off X server Geminias Linux - Newbie 4 01-03-2006 12:50 AM
want to turn old PC into server, need distro help Avatar Linux - Distributions 12 11-17-2004 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration