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

1
vote
0answers
36 views

Check if laptop is asleep

Does anyone know to check via SSH or bash script whether or not my laptop has "fallen asleep". For some reason whenever my laptop falls asleep my drawings (on /dev/fb0) are over ridden by the ...
0
votes
0answers
17 views

Ubuntu VPS in sleep mode / standby?

I currently have a problem with my VPS (ubuntu 14.04.4). When I access it after hours the first time again via HTTP or SSH it takes a few seconds until it reacts, sometimes it is even too long, so it ...
0
votes
0answers
17 views

Gnome 3 on openSuse 42.1: Seemingly Random Commands Causing High CPU Usage

I am experiencing intense cycles of high CPU usage on my openSuse laptop. I have noticed my browser intermittently freezing up (and my fan speeding up) and I checked htop and this is what it looks ...
1
vote
0answers
41 views

C shell. Make script wait for Gnome-terminal to finish

I am working on a script that has to process a lot of data. All comes down to 3 commands. I use: #!/bin/csh gnome-terminal -e "ssh $servername1 'command 1'" & gnome-terminal -e "ssh $servername2 ...
3
votes
3answers
358 views

How to sleep until a given date & time?

I want to write a shell where given a date (day-hour-min) e.g. 10:00 AM Sun 2:30 PM Mon ... It sleeps until that exact date & time. I thought one way of doing it is, I could get the current ...
0
votes
2answers
58 views

Sleep system call and its time parameter

Let's say that we are writing a C program that calls the sleep() function. For instance, by calling sleep(7), the calling thread would be put to sleep for 7 seconds. My question is: Will the thread ...
0
votes
0answers
108 views

Centos7 crontab @reboot sleep not working

I am currently trying to get my server to relaunch a few things on server reboot but they were failing due to screen not yet being loaded (I believe), in an attempt to fix this I added a 3min sleep to ...
0
votes
0answers
24 views

The computer powered off while it was sleeping and now Fedora does not provide power options

I have a Lenovo Ideapad Flex 14D which has been quite happily running Fedora 21/22 KDE spin. However, recently, while the laptop was asleep, the battery came loose which powered off the machine ...
9
votes
3answers
493 views

Perform command every X seconds

I wish to perform a command ever 10 seconds, and have it executed in the background (thereby eliminating watch?). All the answers show something like the following, but this will execute ever 11 to ...
1
vote
2answers
88 views

Batch timeout alternative?

What I need is an 80 seconds sleep, that I could skip by hitting a key. Being able to see the remaining time would be a plus.
1
vote
1answer
451 views

Cannot use computer after Linux mint goes to hibernate

I am running Linux Mint on my Laptop (MacBook Pro 2015 dual booting with Yosemite) however when I put my lid down I have the setting set to 'Hibernate'. The issue is when I put the lid down I cannot ...
1
vote
1answer
242 views

debian testing hangs on wakeup from s2disk / hibernate

My machine (ThinkPad x230) hangs on wake up from s2disk or s2ram after a recent aptitude safe-upgrade.† The hang looks like a blank screen with a blinking cursor in the upper right after loading data ...
2
votes
4answers
363 views

How to influence a bash while loop with a timed global variable?

I have a while loop in a bash script which should do something different at the beginning and at every 5 second interval. Any previous loop is allowed to complete. The 5s interval is indicated by the ...
0
votes
1answer
39 views

Laptop doesn' t want to wake up

My laptop (Notebook HP Pavilion g7t-1100 CTO) have been working fine till today, I enabled Virtual Technology in BIOS and from that time laptop doesn't want to wake up after I slept it. When I disable ...
0
votes
1answer
76 views

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

I am using Linux Mint 17.1 Rebecca, with Cinnamon on a laptop. (I believe Cinnamon is a fork of Gnome). In the system settings I have set the laptop to sleep after 20 minutes of inactivity. I wish ...
1
vote
0answers
33 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
130 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
116 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
337 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
679 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
2answers
71 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
269 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
221 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
229 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
289 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 ...
11
votes
2answers
4k 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
87 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
455 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
107 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
2k 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 ...
5
votes
1answer
1k 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 ...
10
votes
8answers
5k 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: set up a cron-job implement a loop with sleep in the script itself. Question: Which is ...
2
votes
0answers
381 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
3answers
142 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
239 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
1k 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
520 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
2k 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; ...
6
votes
3answers
4k 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
804 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
1k 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
298 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
104 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
889 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 ...
9
votes
5answers
8k 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
816 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 ...
5
votes
2answers
3k 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
2k 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
561 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: ...