Sponsored Content
Full Discussion: how to set timeout?
Top Forums Shell Programming and Scripting how to set timeout? Post 302282388 by uativan on Friday 30th of January 2009 08:26:26 PM
Old 01-30-2009
Quote:
Originally Posted by JerryHone
Why not check if it's a valid IP address with, say, ping before you attempt to connect?

Jerry
Thanks for your advice.

The ip address could be pinged but the computer do not have open ftp / firewall any reason that can't connect through ftp and it hang for a very long while.

Any other solution? thanks.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to set timeout for aix?

if a user login and never shutdown or exit...how do you set an automatic shutdown or timeout if the user leave the session on for 20 minutes? thanks (3 Replies)
Discussion started by: ichiro
3 Replies

2. Programming

How to set the timeout for the client

The scenerio is: 1. A server listens on a port number 2. If the server is down and the Client tries to connect 3. How to set the timeout for the client Detailed explaination: In a client server architecture over a TCP/IP, normally the server is started first which waits and listens for the... (1 Reply)
Discussion started by: shilpi_gup
1 Replies

3. Shell Programming and Scripting

set timeout for ssh prompt

Hi all, I want to set a timeout say 10 sec to shh prompt i.e. if no password is enetered for 10 sec prompt should again come to shell. How can this be achieved ?? I am using Linux RHEL 5 and Solaris 10. Pls help. Thanks in adv. VIKAS (3 Replies)
Discussion started by: vikas027
3 Replies

4. UNIX for Dummies Questions & Answers

Is it possible to set a timeout for rpcinfo?

I've created a script that checks the health of a piece of equipment out in the field by first establishing that it is pingable, and then parsing log files to gather information. Today I realized that there are times where the equipment may be pingable, and will not show any immediate issues in... (1 Reply)
Discussion started by: DeCoTwc
1 Replies

5. Shell Programming and Scripting

set Net:SSH:Expect timeout and set it again.

SSHing into a machine can take a few seconds, but after I'm in, the commands return quickly. I was wondering if the timeout setting can be changed once I'm logged into the machine. Does anyone know if this can be set on the fly? The problem here is, if I have to set timeout = 10, it'll take 10... (1 Reply)
Discussion started by: mrwatkin
1 Replies

6. AIX

Set timeout value for ssh session to HMC?

Friends, Could anyone let me know - how to set the timeout value for ssh session to HMC? My HMC version is -- V7R7.4.0. I'm sure the version doesn't have anything to do with it. Thanks, -- Souvik (2 Replies)
Discussion started by: thisissouvik
2 Replies

7. Red Hat

How to set the screensaver timeout on Red Hat?

How is it possible to set the screensaver timeout on red hat. For solaris I understand it is : for file in /usr/dt/config/*/sys.resources; do dir=`dirname $file | sed s/usr/etc/` mkdir -p $dir echo 'dtsession*saverTimeout: 10' >>$dir/sys.resources echo 'dtsession*lockTimeout: 10'... (0 Replies)
Discussion started by: alvinoo
0 Replies

8. Shell Programming and Scripting

How to set timeout for dev/tcp while checking hostname and port?

I have a command to check the status of hostname and port number, echo > /dev/tcp/hostname/80 echo $? 0 success case echo > /dev/tcp/hostname/809999 I got the output ------------------- connection timed out It took almost 4 minutes to time out,,, how can I set it to 10 seconds? my... (2 Replies)
Discussion started by: sam@sam
2 Replies

9. Linux

Is it possible to set timeout on Linux screen session

Hello friends, I work on Linux servers via SSH (putty) and run "screen" to preserve my sessions so I can attach/detach them at anytime I wish without losing the connectivity/process disruption which is working perfectly fine. As my team members also have root access to those servers, it is... (7 Replies)
Discussion started by: prvnrk
7 Replies
REDIR(1)						      General Commands Manual							  REDIR(1)

NAME
redir - redirect tcp connections SYNOPSIS
redir [--laddr=incoming.ip.address] [--caddr=host] [--debug] [--syslog] [--name=str] [--timeout=n] [--bind_addr=my.other.ip.address] [--ftp=type] [--transproxy] [--connect=host:port] --lport=port --cport=port [--bufsize=n] [--max_bandwidth=n] [--random_wait=n] [--wait_in_out=n] redir --inetd [--caddr=host] [--debug] [--syslog] [--name=str] [--timeout=n] [--ftp=type] [--transproxy] [--connect=host:port] --cport=port [--bufsize=n] [--max_bandwidth=n] [--random_wait=n] [--wait_in_out=n] DESCRIPTION
Redir redirects tcp connections coming in to a local port to a specified address/port combination. It may be run either from inetd or as a standalone daemon. Depending on how redir was compiled, not all options may be available. OPTIONS
--lport Specifies port to listen for connections on (when not running from inetd) --laddr IP address to bind to when listening for connections (when not running from inetd) --cport Specifies port to connect to. --caddr Specifies remote host to connect to. (localhost if omitted) --inetd Run as a process started from inetd, with the connection passed as stdin and stdout on startup. --debug Write debug output to stderr or syslog. --name Specify program name to be used for TCP wrapper checks and syslog logging. --timeout Timeout and close the connection after n seconds of inactivity. --syslog Log information to syslog. --bind_addr Forces redir to pick a specific address/interface to bind to when it listens for incoming connections. --ftp When using redir for an FTP server, this will cause redir to also redirect ftp connections. Type should be specified as either "port", "pasv", or "both", to specify what type of FTP connection to handle. Note that --transproxy often makes one or the other (generally port) undesirable. --transproxy On a linux system with transparent proxying enabled, causes redir to make connections appear as if they had come from their true origin. (see /usr/share/doc/redir/transproxy.txt) --connect Redirects connections through an HTTP proxy which supports the CONNECT command. Specify the address and port of the proxy using --caddr and --cport. --connect requires the hostname and port which the HTTP proxy will be asked to connect to. --bufsize n Set the bufsize (defaut 4096) in bytes. Can be used combined with --max_bandwidth or --random_wait to simulate a slow con- nection. --max_bandwidth n Reduce the bandwidth to be no more than n bits/sec. The algorithme is basic, the goal is to simulate a slow connection, so there is no pic acceptance. --random_wait n Wait between 0 and 2 x n milliseconds before each "packet". A "packet" is a bloc of data read in one time by redir. A "packet" size is always less than the bufsize (see also --bufsize). --wait_in_out n Apply --max_bandwidth and --random_wait for input if n=1, output if n=2 and both if n=3. SEE ALSO
inetd(1) local REDIR(1)
All times are GMT -4. The time now is 09:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy