timeout(1) The Netatalk Project timeout(1)NAME
timeout - Send a signal to a program after a certain time
SYNTAX
timeout [-s signal] seconds program [args]
DESCRIPTION
timeout executes a program (with arguments args) and sends a signal to it after a certain amount of seconds.
OPTIONS -s signal
Signal to send to the spawned process. This can be a numerical or symbolic ID. This defaults to TERM.
EXAMPLES
timeout 10 pap foo.ps
Execute "pap foo.ps" and send a SIGTERM if pap doesn't return after 10 seconds.
timeout -s HUP 60 sh
Spawn a shell and send a hangup signal after one minute.
timeout -s 9 10 evilprog
Execute a program and KILL it if it doesn't quit after 10 seconds.
netatalk 1.5pre7 19 Jul 2001 timeout(1)
Check Out this Related Man Page
TIMEOUT(1) User Commands TIMEOUT(1)NAME
timeout - run a command with a time limit
SYNOPSIS
timeout [OPTION] DURATION COMMAND [ARG]...
timeout [OPTION]
DESCRIPTION
Start COMMAND, and kill it if still running after DURATION.
Mandatory arguments to long options are mandatory for short options too.
-k, --kill-after=DURATION
also send a KILL signal if COMMAND is still running this long after the initial signal was sent.
-s, --signal=SIGNAL
specify the signal to be sent on timeout. SIGNAL may be a name like `HUP' or a number. See `kill -l` for a list of signals
--help
display this help and exit
--version
output version information and exit
DURATION is an integer with an optional suffix: `s' for seconds(the default), `m' for minutes, `h' for hours or `d' for days.
If the command times out, then exit with status 124. Otherwise, exit with the status of COMMAND. If no signal is specified, send the TERM
signal upon timeout. The TERM signal kills any process that does not block or catch that signal. For other processes, it may be necessary
to use the KILL (9) signal, since this signal cannot be caught.
AUTHOR
Written by Padraig Brady.
REPORTING BUGS
Report timeout bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report timeout translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO kill(1)
The full documentation for timeout is maintained as a Texinfo manual. If the info and timeout programs are properly installed at your
site, the command
info coreutils 'timeout invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 TIMEOUT(1)
I want to prompt a user for input but I want it to timeout after a specified time if no response is given. I tried the sleep command but this does not work. I am using ksh.
Thanks. (10 Replies)
Hi All,
I want to know whether we can timeout the cd command in unix.
If we can how is it implemented?
Suppose cd command hangs can we timeout the command.
Please help (9 Replies)
hello folks,
I am trying to install solaris 10 through network using jumpstart but the thing is i am facing problem with the following message problem Timeout waiting for arp/rarp i made sure everything correct as /etc/hosts and /etc/ethers cables are connected, plz anyone help me out (7 Replies)
When I run a script where the 1st parameter is ip address
ftp -n -i -v $1
I hang here if the ip is wrong
how to set a timeout something like
if (20s not complete "ftp -n -i -v $1") then
echo "error"
fi
Thanks a lot. (14 Replies)
Do you guys know of a way to limit the amount of time will be spent attempting to create a ONC RPC client?
I am currently using the function clnt_create() to create my clients. However, if the remote RPC IP address is not reachable (on different network and unplugged) the GETPORT for portmapper... (7 Replies)
Below is my code. Every once in a while the select call takes as long as 150 seconds (discovered by printing time before and after this statement) while the timeout specified into it is only 1 second. Any clue why? I can't believe that select call which has been around for centuries can have a bug,... (15 Replies)
Hi,
I have two solaris 9 servers on the same switch,
primary
int0: 10.35.65.51
int1: 10.35.65.53
warm standby
int0: 10.35.65.52
int1: 10.35.65.54
Primary server communicates with the other for db replication on int0 interfaces.
But meanwhile we are using web interface running... (8 Replies)
Hi all.
I have an expect script which for walks across servers, checks freespace and provides sorted list of biggest files
#!/usr/bin/expect --
set timeout 600
stty -echo
log_user 0
spawn -noecho sudo -u introot /home/introot/bin/twssh
expect root
send_user "Entering \r"
send "uname\r"... (15 Replies)
Hi,
I am facing a strange issue when connecting to SQLPLUS via a shell scripts.
I am using Linux 2.6.18-274.18.1 and gbash shell.
When I connect to SQLPLUS through scripts then it throws TNS Time Out error ""sometimes"" and connects successfully other times.This is only happening when... (9 Replies)
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 $REPOSITORY_NAME.$cs -Udmadmin -P"" -R$DM_SCRIPTS/test.api > /dev/null 2>&1
if ; then
echo... (7 Replies)
I saw several thread for this issue but none addresses my issue.
I have tried read -t but the result is read bad options
My requirement is
1. Ask for input
2. If input = y or no input in 60 seconds
then continue processing
else
exit
fi
Kindly consider this urgent. (8 Replies)
How hard is it to create some kind of timeout procedure for using to much memory or cpu on a linux/unix server? What would you have to do to do this? (8 Replies)
Hello guys.
I need some help. First of all, sorry about my english, that is not my native languaje.
I have a bash script in Solaris with the next lines:
And the sftp.sh has this:
The problem is that sometimes the sftp takes a long of time. I mean, 2 or 3 hours when it should... (12 Replies)