Friday, December 10, 2010

rtcwake : Wake up your system after given time.

Waking up the pc is the common need of every moderate users. In that case rtcwake is a useful utility for you. Using this utility you can wake up your linux box at any given time. So, why do we need to wake up the poor soul. Because of the following reasons:
  • System clean-up when you are busy sleeping after exploiting the pc for a whole day.
  • Routine System backup when you are busy attending other emergencies. 
  • Running a cron job like buzzing a song to wake you up. 
The usage can be endless. To install this program. Execute commands below.

sudo apt-get install rtcwake
sudo chmod u+s /usr/sbin/rtcwake

An example of the rtcwake command can be
rtcwake -m mem -s 300



-m stands for mode. Use standby state mode. Valid values are standby(sleep), mem(suspend to RAM), disk(hibernation) and on (no suspend). The default is standby.
-s stands for seconds after the pc is awaken. In above example, it is 300 seconds.
You can use -t instead of -s.
Go through the man pages for all options.
For know how about setting cron jobs click the link.


Warning: Be informed, rtcwake is kernel level program & may damage your pc. It don't works on older versions of Linux. You need root permission to execute it.  For more complex sleep modes, you will need a modern BIOS. This can happen to you too.

References:
http://linux.die.net/man/8/rtcwake
http://www.osnews.com/story/24111/Wake_Your_Linux_Up_From_Sleep_for_a_Cron_Job

For further tweaking visit:
http://forum.xbmc.org/showthread.php?t=76710
http://www.uluga.ubuntuforums.org/showpost.php?p=8278439&postcount=14

No comments:

Post a Comment