a command for delaying execution of a program for the given length of time. For low power mode, use *suspend* instead.

learn more… | top users | synonyms

0
votes
1answer
16 views

How to Insert command to run before Linux Mint 17.1 Rebecca, Cinnamon, sleeps

:) Hi I am using Linux Mint 17.1 Rebecca, with Cinnamon on a laptop. (I beleive Cinnamon is a fork of Gnome). In system settings I have set the laptop to sleep after 20 mins of inactivity. I wish ...
1
vote
0answers
9 views

Monitor won't sleep RHEL 6.5

I just installed linux and even after 30 minutes the monitor never goes to sleep. I have no idea where to look beyond the power management settings. Tried even setting the turn monitor off after 1 ...
0
votes
0answers
35 views

Is my MacBook Air sleeping under Debian Jessie?

I frequently notice the Apple logo lights up relatively briefly when the lid is closed on my MacBook Air running Debian Jessie. If I suspend with the lid open then the lock screen briefly appears and ...
0
votes
1answer
42 views

shell sleep until next full minute

To execute a script on the next full minute I want to tell the sleep command to sleep until the next full minute. How can I do this?
4
votes
2answers
126 views

status check for sleep command

I have run sleep command in background as follow , How can I know the status of execution ..? Command sleep 2d ; find /home/disk1/ -exec touch {} \; & How can I know that its executed for 1 ...
0
votes
1answer
176 views

How i make this script execute every minute without cron? [duplicate]

I have this: #!/bin/bash wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l` if [ $wlan -eq 0 ]; then echo wlan0 not connected, connecting... echo sudo ifup wlan0 logger wlan0 reconnected. echo ...
1
vote
3answers
48 views

the “done” message after a &-command is not displayed right away, but after a user action. Why?

I do a sleep 3 & and the "done" message is displayed as part of the ps command, not right on the console. It doesn't have to be ps. Any command after the sleep is done will have an extra line at ...
1
vote
0answers
104 views

How to prevent automatic external hard-drive unmount

I am running some simulations in Matlab on a Linux machine (running Debian Gnome v3.4.2). All the scripts and heavy .mat files are in an external 1TB Toshiba hard-drive connected through USB 3.0 to ...
3
votes
1answer
80 views

How can I display uptime with sleep-mode time excluded?

I put my laptop to suspend mode, woke it up later, and now it shows uptime some 23 hours (with uptime), which is obviously not true. I suspect uptime simply returns the difference between the ...
1
vote
0answers
111 views

udevadm trigger runs only one rule

I have 1294:1320 RISO KAGAKU device on F17. The problem is after sleep/resume hid reclaims this device back and its udev rule is ignored. If I unplug and plug in the device it is OK until next ...
1
vote
1answer
146 views

Types of sleep modes for processes

I came across this while troubleshooting why our server is doing down everytime the oracle process is killed. I listed the oracle process running on the server using ps aux | grep oracle and here is ...
6
votes
1answer
2k views

How to run systemd user service to trigger on sleep (aka. suspend, hibernate)?

Based on various sources I have cobbled together ~/.config/systemd/user/screenlock.service: [Unit] Description=Lock X session Before=sleep.target [Service] Environment=DISPLAY=:0 ...
2
votes
0answers
66 views

How do I find out what process is putting my machine to sleep?

My laptop is going to sleep after about 10 minutes of inactivity, and I don't know why. I verified the standard power options, are they're not set to put my machine to sleep. Here is grep's output ...
0
votes
1answer
234 views

Using the Echo Command with Sleep command

So I asked a question on here a few weeks ago and the response I got was helpful but I figured I would add some info to get a better response. I work with a computer system that has 8 servers (4 ...
2
votes
1answer
92 views

Linux Fedora: can I preserve what I am doing so that everything will be restored when I power up again

I have Linux Fedora 20, with Gnome classic desktop. When I power down, via the "Power Down" icon on the top bar, everything shuts down, and everything is gone when I power up again, although I can ...
1
vote
0answers
1k views

CentOS 6.5 will not sleep after period of inactivity

I've recently upgraded my Ubuntu 12.04 LTS to CentOS 6.5. This is a desktop PC (non-server) that I would like to sleep/power down after a period of inactivity. I have the following settings in my ...
3
votes
1answer
343 views

Wake monitor from sleep remotely

I have an Ubuntu server running xdm with openbox on which is plugged a monitor that displays a video which is launched via a cron daemon. When the monitor is not used for a certain amount of time, it ...
8
votes
7answers
4k views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
2
votes
0answers
226 views

How to use systemd hybrid-sleep instead of suspend under GNOME in Linux? [closed]

How can I make GNOME 3 use systemd hybrid-sleep instead of suspend, when closing the lid or using suspend from the menu?
0
votes
2answers
118 views

Red Hat Enterprise Linux 6 wakes up spontaneously after sleeping

I have a Lenovo ThinkPad T430 running Red Hat Enterprise Linux 6.5. Today I put my computer to sleep, double checked 10 seconds later, only to find out after arriving to my office that my computer ...
2
votes
1answer
140 views

Is uninterruptible sleep the only case?

French wikipedia say: Un processus en sommeil ininterruptible ne peut s'arrêter (ni libérer ses ressources) même lorsque SIGKILL apparaît. Il s'agit d'un des rares cas dans lequel un système ...
3
votes
1answer
780 views

Python script run while screen is locked

I have a python script which seems to be failing to continue running its while True: ... sleep() loop my code is at http://github.com/xdaimon/xdaimonConky What happens is I autostart python on ...
7
votes
3answers
353 views

What's the difference between && and ; when forking sleep to background?

I have just asked a question about forking a process to sleep in the backgroud. The notation I came up with myself looks like this: sleep 10 && echo "hello world" & This answer to a ...
3
votes
1answer
1k views

Why a sleep 300 (5 minutes) can last several hours some time? [closed]

I have a MiniMac with the OSX system. My script is: while true do echo "Sleep 300 seconds = 5 minutes" date sleep 300 echo "end of sleep" date done I want it to repeat every 5 minutes; ...
2
votes
2answers
2k views

Sleep until next occurrence of specific time

I need a series of commands or a single command that sleeps until the next occurrence of a specific time like "4:00" occurs. How would I do that? The at command or a cronjob is not a option because ...
2
votes
3answers
501 views

The only way to turn off/on wifi is to put laptop into sleep mode

After start GNOME prints Hardware disabled. I've tried to use keyboard shortcut and it doesn't work. Only way to disable/enable hardware wifi is to put laptop into sleep mode and restore.
3
votes
1answer
999 views

Closing lid on Crunchbang

I'm running Crunchbang on a laptop. I can't seem to find an option to toggle if the laptop goes to sleep when the lid closes. There are certain times where I want to put the laptop away or close it ...
2
votes
0answers
253 views

Waking an Ibook G4 (powerpc) running Debian Linux from suspend based on timer

I have recently received an Ibook G4 from a friend. I plan to use it as a server and have installed Debian Wheezy (7.0.0, release version) on it. However, I would like to suspend it at some points ...
2
votes
0answers
87 views

How to know when a device is ready

I have firewire mixing console and I wrote an udev rule which calls a script to set up the whole audio chain (alsa -> pulseaudio -> jackd -> firewire) as soon an the console is switched on. Now I ...
1
vote
2answers
621 views

Computer doesn't wake from sleep mode

I have a laptop with Linux Slackware 14, KDE 4.8.5, kernel 3.9.0-rc6. When I close the lid and pull out the power cord, the machine goes into sleep mode. When I wake it, plugging the cord back in and ...
7
votes
5answers
5k views

Avoiding busy waiting in bash, without the sleep command

I know I can wait on a condition to become true in bash by doing: while true; do test_condition && break sleep 1 done But it creates 1 sub-process at each iteration (sleep). I could ...
3
votes
1answer
636 views

Kubuntu doesn't reconnect to Wifi after waking up from sleep

I just installed Kubuntu on my laptop and it's working fine so far, except the wireless connection is not switched on after waking up from sleep. I do have to click "Enable wireless" so that it ...
4
votes
2answers
2k views

How preemption works on Linux when a program has a timer less then 4ms?

Jiffies in most Linux system are defaulted to 250 (4ms). The questions is that what happens when a program has a usleep() less then 4ms ? Of course it works as should when it is scheduled. But what ...
4
votes
1answer
1k views

auto reconnect VPN on waking up

When I wake up my computer, the internet automatically reconnects, however the VPN does not. Is it possible to make it automatically reconnect (using the network manager on KDE, or at least in a way ...
3
votes
1answer
468 views

Plotting the sleep/wait chain of a process

I often want to know why a process in the middle of a pipeline is sleeping and not busy processing data. My current method is: find the pid of interest sudo strace -pt pid to get the blocking ...
1
vote
3answers
2k views

Use DD-WRT to auto WOL when traffic is on same subnet

So i've seen the WOL scripts and they seem like they could work well when i'm trying to connect from a computer that is outside my router. Script i'm using: ...
3
votes
0answers
197 views

Sleep key stops working after some time

I've got a "Sleep" key on my keyboard that I use to suspend the system when I'm away from the computer for a longer time. This works fine, at least for a while after I've turned the computer on. ...
1
vote
0answers
143 views

Debian Mouse Preference?

I just loaded Debian onto a live usb today for the first time. I successfully killed my laptops annoying trackpad with the synclient command, but now I can't figure out how to get Debian to stop ...
1
vote
1answer
862 views

Alternative for `sleep seconds` that takes system load into account?

So I develop my server app and some client apps for it. After each rebuild I start my server (which tends to load qup all services for something like 2 seconds) and then I start my clients... So his ...
2
votes
1answer
3k views

Script to SCP files works manually but not through cron

I'm using CentOS 5.6. The below code might have some typos as I needed to change real info to fake info for security reasons: backup.sh #!/bin/bash set -vx rm -v /server/temp_db.gz rm -v ...
1
vote
4answers
352 views

Faster delayed execution than 1 minute?

I am working on a program that can "upgrade itself" by install a new package. In order to accomplish this, I am using the at command to specify that a shell script should be run one minute in the ...
7
votes
2answers
980 views

What is a good way of saying “run this after 15 minutes” on a shell?

I use this sleep 900; <command> on my shell. Just wanted to know is there is some alternate/better way that you use?
2
votes
2answers
312 views

Different sleep binaries on Mac (Darwin) and in Linux. How to properly handle the differences?

In my Linux box, sleep accepts seconds, minutes and hours. So: sleep 10m Sleeps for 10 minutes (or 600s). sleep on Mac only accepts seconds as argument. sleep 10m doesn't work, only sleep 600s. ...
2
votes
1answer
19k views

Adding Sleep command to shell script?

How can I add a 10sec sleep to my loop after each page is processed? #!/bin/sh for page in {1..50} do wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \ | tr '"' ...
2
votes
1answer
824 views

Screen fading out on GNOME, without ability to cancel

Sometimes, on my Arch Linux laptop, using GNOME for the desktop, my screen will fade out after a while of non-activity (even if I'm watching a video). This fade out is very slow, and can't be ...
8
votes
2answers
2k views

How to power off a system but still keep it available on the network

I'm looking into installing a file server on my network, for serving data and backups. I want this machine to be available at all times, but I would rather not keep it on all the time (as to conserve ...