I'm writing a shell script to check the I/O activity of a Linux box and if the server is quiet for a certain long time, the script should let the server go to sleep. But, after some Google searching, I didn't find a answer yet. Is there a shell script command to put a Linux box to sleep?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
Using the handy pm-utils package, you can issue commands to suspend and hibernate without echo'ing values to the system. For example:
|
|||
|
|
|
To answer your question simply, |
|||
|
|
|
If your setup supports hibernation you can use the sys interface
to suspend to ram and
to suspend to disk. Remind that your kernel and hardware have to support it to use it. |
|||
|
|