The tag has no wiki summary.

learn more… | top users | synonyms

32
votes
5answers
5k views

Timing out in a shell script

I have a shell script that's reading from standard input. In rare circumstances, there will be no one ready to provide input, and the script must time out. In case of timeout, the script must execute ...
18
votes
1answer
2k views

Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.
16
votes
4answers
18k views

How to introduce timeout for shell scripting?

I want to run a shell script that got a loop in it and it can go for ever which I do not want to happen. So I need to introduce a timeout for the whole script. How can I introduce a timeout for the ...
7
votes
3answers
13k views

Does curl have a timeout?

So far I couldn't find anything really, but is it true that curl doesn't really time out at all? user@host:~# curl http://localhost/testdir/image.jpg I'm asking because I'm redirecting any request ...
7
votes
3answers
1k views

How to constraint time a program runs in Linux?

I have several simulations to do, each is invoked with python simulate.py <parameter list>. The problem with these simulations is that some of them hang without quiting, which prevents me from ...
7
votes
3answers
9k views

mptscsih: ioc0: task abort: SUCCESS (rv=2002) causes 30 seconds freezing

I/O to my software RAID6 often freezes for around 30 seconds after which everything is back to normal. After the freeze is over this is put into syslog: Mar 14 18:43:57 server kernel: [35649.816060] ...
7
votes
2answers
273 views

Kill a process if it goes quiet for a certain amount of time

I have a utility that has a nasty habit of going quiet and staying there, I already know how long into the process it does this so I am using timeout to fight this, but sometimes it does it before ...
6
votes
2answers
328 views

How to make a TCP socket time out

For network catastrophe simulations of our server environment, we are looking for a way to intentionally timeout a TCP socket. Are there any simple ways for existing sockets? Also, little C test-case ...
6
votes
1answer
3k views

How long is a TCP local socket address that has been bound unavailable after closing?

On Linux (my live servers are on RHEL 5.5 - the LXR links below are to the kernel version in that), man 7 ip says: A TCP local socket address that has been bound is unavailable for some time after ...
6
votes
1answer
54 views

How to make gksudo or gksu sessions last longer in Linux

Every time I want to open a GUI program that needs root permissions, I have to put my password. For example, I open synaptic and put my password then close it and a second later decide to reopen it it ...
6
votes
1answer
1k views

How to mount a Truecrypt container with a timeout from the command line?

I'm mounting a truecrypt container via the command line (i.e. truecrypt file dir). Is there any way to have truecrypt automatically unmount the container after a given amount of inactivity in dir?
5
votes
1answer
469 views

Too big delay with xscreensaver on wrong password in OpenSUSE 12.2

There is too big delay when logging in with xscreensaver in OpenSUSE 12.2 --- Actual delay is 10 seconds, but not found anywhere in configs Already done: checked pam timeout in login.defs (3 ...
4
votes
3answers
69 views

How to send SIGKILLs to entire pipeline?

while true; do # process substitution instead of usual pipeline to avoid waiting for all programs handle_input_with_timeout < <( prog1 | prog2 | prog3 ) echo "Data stopped flowing. ...
4
votes
1answer
2k views

named does't start when using systemctl

I am having trouble getting named to start using systemd on the Fedora 18 Raspberry Pi spin. It starts, then a few moments later there is a timeout and it fails. If I run the commands in named.service ...
3
votes
2answers
306 views

why slight delay after failed login in tty [duplicate]

Possible Duplicate: Why a wrong password gives a big delay Whenever I mistype my password when logging in in a tty, I have noticed that I have to wait for a second before I'm able to log in ...
3
votes
1answer
298 views

How to disable timeout of password prompt for partition decryption during boot?

I have a computer running OpenSUSE 12.1, 64-bit, default install. How it works currently: I turn on the computer It goes through the boot process At some point during boot, I am asked for password ...
3
votes
2answers
2k views

From shell, killing a process if wallclock runtime exceeds some predetermined value

I want to start a process from a shell script, allow it to interact with the user (so I cannot just background it, grab the PID, launch sleep followed by sanity checks and kill), but if it is still ...
3
votes
3answers
2k views

MySQL Linux Client Timeout/Keepalive

Is there a way to set a keepalive in the command-line MySQL client on Linux? Our network recently moved to a VLAN setup, and our systems department no longer has control of the firewall. The ...
3
votes
2answers
93 views

change tty login timeout - ArchLinux

By default when I login to my Arch linux box in a tty, there is a timeout after I type my username but before I type my password. So it goes like this Login: mylogin <enter> Password: (+ 60 ...
3
votes
3answers
416 views

timeout without killing process in bash

I have a main script that I'm running, and from it I have a second "slow process" I want to kick off, and "do something" in the main script if it doesn't complete in the time limit -- depending on if ...
3
votes
1answer
1k views

How to kill a command started over SSH - the SSH connection lost

If I use timeout 10 ssh -n -o BatchMode=yes 1.1.1.1 'sleep 20' > 1.1.1.1.txt 2>&1 & To give out a remote command on a server, and I kill the SSH connection after 10 seconds, then I ...
3
votes
3answers
326 views

Kill process when it stops to produce further output

Is there a shell tool which can probe if a subprocess is still producing output, and otherwise kill it after a specified timeout? I'm using offlineimap for Gmail backup, but that's very very very ...
3
votes
1answer
1k views

Apache 70007 and 70014 errors [closed]

I have a service where mobile phones send a big hash of data to our server which are sitting on AWS behind the ELB. Once in a while we receive 70007 and 70014 errors in the apache error logs, the ...
2
votes
1answer
2k views

How do I remove the timeout in the boot menu

I am a beginner to Linux so I installed several operating systems on my computer in a multiboot configuration (Ubuntu, Linux Mint, Windows, ...). When I turn on my PC, the boot menu appears with a ...
2
votes
1answer
496 views

SSH connection timed out. it's not client or server…what now?

I have been using a Linux server via SSH for months, it still works from other locations but for some reason, this week, it isn't working from the office. Putty says "Connection timed out" Is there ...
2
votes
3answers
2k views

TFTP configuration problems

I can not get TFTP to work properly on my system. I have set /etc/default/tftpd-hpa to /srv/tftp/ which I have set to permissions 777 like all the contents as well (and /srv/ too) however, whenever I ...
2
votes
2answers
700 views

Timeout doesn't occur when reading from fifo using `read`

Look at this code: while read -t 3 line; do echo ${line} done < /opt/data.log data.log is a fifo. One process is writing to this, and this code should be reading it to show to the user. But ...
2
votes
3answers
985 views

Timeout `idql` command in ksh

I probably read all the threads in almost all the forums for a solution to my need. I am a beginner in shell scripting and I dont have a perfect solution yet. Below is my code snippet. idql -n ...
2
votes
1answer
257 views

Use time ,timeout and ulimit commands properly

I'm running a command in CentOS and at the same time I want to do 2 things: write the run time of the command to a file and set a time limit which stops the command I implemented the first one ...
2
votes
0answers
31 views

Last data traffic time for a TCP socket

Is it possible, to find out when was the last time there was any traffic on an opened TCP socket? Keepalive and timeout timers are based on this statistic, so I guess it has to be stored somewhere. ...
2
votes
0answers
119 views

Why sudo won't remember my password?

I use sudo in many systems, but I have one of them that makes me type my password each time I run sudo. All the others remember it for a while. This is debian 7.4 wheezy and sudo 1.8.5 I found this : ...
2
votes
0answers
100 views

CentOS 5.5 server dropping & blocking connection

I'm running a CentOS release 5.5 (Final) server running the LAMP stack amongst other things. When working on a web project with numerous active connections to the server box (Plesk over HTTP, SSH and ...
2
votes
1answer
359 views

How can I configure OpenVPN to wait for slow SOCKS proxies?

I'm experimenting with OpenVPN connections routed through Tor, using pairs of Tor gateway and OpenVPN-hosting VMs. On the server side, link local ports are forwarded to Tor hidden-service ports on the ...
2
votes
0answers
159 views

IPTables dropping UDP packet stream

I have a configuration where UDP packets containing encapsulated DNS data are sent to a KVM instance for processing. The KVM instance sits behind an IPtables firewall which is also doing NAT. The ...
2
votes
1answer
106 views

mpd daemon prematurely ending jobs

I am a little out of my depth here so bear with me. I am trying to configure mpirun and mpiexec to run software called Materials Studio on a 1 node, 2 processor, 12 core cluster. The submission scheme ...
2
votes
0answers
112 views

Shorter timeout on I/O errors MacOS X

How do you set a shorter timeout value for read/write I/O errors on MacOSX? We tend to get a few semicrashed disks and want to rsync the contents to a secure location, but when the file subsystem ...
1
vote
2answers
3k views

What is the difference between ping -w and ping -W?

What is the -w (deadline) flag in ping for? I cannot find a description of it in the ping man page; only for -W, which takes seconds as a parameter. What is the difference between them, and how can I ...
1
vote
4answers
39 views

Set timeout for web page response with curl

I use a tool to monitor if the web-page is up and running. The tool uses curl command internally to fetch the output. However, when a web-page takes longer time to respond, it results back with a ...
1
vote
2answers
350 views

Keeping xterm terminal alive on crunchbang linux debian wheezy

I like to keep a number of terminals open at different locations on my development VM. For this I use terminator because I got a big screen and I can divide the terminals anyway I want. But after ...
1
vote
1answer
94 views

Find if a process terminates in a specific amount of time

I am running a program.Inside this program i run a specific command and i use ulimit command to terminate the running of that command if it exceeds an amount of time.To be more clear i run this: ...
1
vote
1answer
35 views

Can Linux programs be sent a SIGXXX command they can respond to in the UI?

I am trying out the timeout command and would like to know if there is a kill signal that a GUI program, whether a graphics desktop or a terminal program will treat as the user terminating the program ...
1
vote
1answer
257 views

rtorrent: 'Tracker Timeout' caused by IPtables

I'm trying to secure my rtorrent-running-homeserver with IPtables. With the aim to allow only incoming connections to the rtorrent port 6890 and 5292 for ftp (both are forwarded by the router), I ...
1
vote
1answer
290 views

TT-Connect CT2-4650 CI doesn't initialize (Timeout?)

I've tried to get a Techno Trend TT-connect CT2-4650 CI running under a Kali Linux, where I suppose the kernel is about the same as on a current Debian. The compilation ran just fine. The kernel ...
1
vote
1answer
2k views

iptables prevents connection via ssh after port change despite ACCEPT rule

I have two machines hooked up to a router, one Windows with PuTTY, and one CentOS 6.4 with sshd and with the default SELinux still enabled. They can both ping each other successfully. I installed ...
1
vote
1answer
680 views

SSH to machines in new subnet - connection timeout

I'm using RHEL4 and RHEL5. A new group of Linux machines are setup recently using 172.16.32.0/24. The existing RHEL machines are running on 172.16.1.0/22 and 172.16.4.0/22. When I try to ssh from ...
1
vote
0answers
47 views

6.0.7 Debian timeout if more connections at once

We are a some devs working on a Debian server. We are all connecting from one IP. So basically the server handles a lot of requests from the same IP. Now what happens from time to time, is that we ...
1
vote
2answers
31 views

Increasing the time for requests to complete

I have a one off web request that I need to send via a Wordpress page hosted on my server. The request takes a long time because it's processing a lot of data; unfortunately, the page returns with an ...
0
votes
1answer
35 views

Other Programs Cannot Connect To MySQL

So just recently when installing php-fpm, I had installed a few MySQL packages with it (I believe). I already had mysql installed. However now when any of my programs attempt to access the database, ...
0
votes
1answer
218 views

How to display a .jpg file using fbi in a bash script for set amount of time and then execute the next command in the script

I am trying to use fbi in a bash script to display a series of .jpg images. But once fbi begins its process, it continues to cycle through the images and I only want to display each image once for a ...
0
votes
1answer
2k views

Execute command for x seconds? [duplicate]

Possible Duplicate: Run a command for a specified time and then abort if time exceeds Is there a command which allows me to execute another command for at most x seconds? Imagined example: ...