Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sleepctl(1) [debian man page]

SLEEPCTL(1)						      General Commands Manual						       SLEEPCTL(1)

NAME
sleepctl - enable/disable sleepd SYNOPSIS
sleeptcl [on|off|status] DESCRIPTION
sleepctl allows temporarily disabling of the sleepd(8) daemon, by a regular user. This can be useful when you're in the middle of a long download or compile, and don't want the system going to sleep in the middle. "sleepctl off" makes sleepd not put the system to sleep even if it thinks it is idle. If this command is run more than once, the requests stack up, and a like number of "sleepctl on" commands must be run to re-enable sleeping. This may be useful if multiple automated processes or users use the command. Note that the system may still be put to sleep for other reasons, such as a failing battery. "sleepctl on" re-enables sleeping. If sleeping is re-enabled and sleepd has seen no system activity for some time, and has been prevented from putting the system to sleep, it may put the system to sleep immediatly. "sleepctl status" outputs the current status of sleepd. Note that if the system is forced to sleep by other means, sleepd will not remember what mode it was in when it wakes back up, and will return to the default mode of putting the system to sleep after some amount of inactivity. This is by design, so you may easily and natu- rally undo the effects of a "sleepctl off" without remembering to turn it back on. This program communicates with sleepd by writing to the file /var/run/sleepd.ctl. As such, it needs read/write access to that file. It also needs to run as whatever user sleepd runs as, so it can hup the daemon. EXAMPLES
sleepctl off ; wget http://foo/huge.tgz ; sleepctl on SEE ALSO
sleepd(8) http://kitenet.net/~joey/code/sleepd/ AUTHOR
Joey Hess <joey@kitenet.net> SLEEPCTL(1)

Check Out this Related Man Page

CAFFEINATE(8)						    BSD System Manager's Manual 					     CAFFEINATE(8)

NAME
caffeinate -- prevent the system from sleeping on behalf of a utility SYNOPSIS
caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...] DESCRIPTION
caffeinate creates assertions to alter system sleep behavior. If no assertion flags are specified, caffeinate creates an assertion to pre- vent idle sleep. If a utility is specified, caffeinate creates the assertions on the utility's behalf, and those assertions will persist for the duration of the utility's execution. Otherwise, caffeinate creates the assertions directly, and those assertions will persist until caffeinate exits. Available options: -d Create an assertion to prevent the display from sleeping. -i Create an assertion to prevent the system from idle sleeping. -m Create an assertion to prevent the disk from idle sleeping. -s Create an assertion to prevent the system from sleeping. This assertion is valid only when system is running on AC power. -u Create an assertion to declare that user is active. If the display is off, this option turns the display on and prevents the display from going into idle sleep. If a timeout is not specified with '-t' option, then this assertion is taken with a default of 5 second timeout. -t Specifies the timeout value in seconds for which this assertion has to be valid. The assertion is dropped after the specified time- out. Timeout value is not used when an utility is invoked with this command. -w Waits for the process with the specified pid to exit. Once the the process exits, the assertion is also released. This option is ignored when used with utility option. EXAMPLE
caffeinate -i make caffeinate forks a process, execs "make" in it, and holds an assertion that prevents idle sleep as long as that process is running. SEE ALSO
pmset(1) LOCATION
/usr/bin/caffeinate Darwin November 9, 2012 Darwin
Man Page