Sponsored Content
Full Discussion: RSH Timeout
Operating Systems Linux RSH Timeout Post 302356757 by gowri_g_s on Sunday 27th of September 2009 12:47:00 PM
Old 09-27-2009
I would try to do the following (Im a beginner Smilie ) -

Code:
CHK=`ssh2 -q <IP> "ps -ef | grep rshd | grep -v grep"`  

if [ $CHK -eq 0 ]; then
    sleep 30
    CHK=`ssh2 -q <IP> "ps -ef | grep rshd | grep -v grep"`
    
   if [ $CHK -ne 0 ];then
      //call your script here
   else
     //rshd in remote sys is not up
    //do what you want to
   fi
else
  //rshd running - call your script here too
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Timeout Error

I'm getting a error on a old SPARC Station 5 system. The HDD I am using in internal 18GB. Everything use to work, and well wont now. The error I am getting is in bootup. The error is 'Timeout waiting for ARP?RARP packet error'. Anyone got any idea how I can fix this? I'm not sure... (4 Replies)
Discussion started by: merlin
4 Replies

2. UNIX for Dummies Questions & Answers

sendmail timeout

Just implemented sendmail on rh9. The clients are timing out or dropping a connection to the server. What's up? I've been tweaking, but no noticable change. They can recieve and send mail, but it errors out consistently and then reconnects fine. Am I missing a timeout setting in the cf file? ... (1 Reply)
Discussion started by: benzo
1 Replies

3. HP-UX

timeout

How can I kick a user out after being idle for a certain amount of time, would prefer not to use scripts, will TMOUT work on HP-UX? (5 Replies)
Discussion started by: csaunders
5 Replies

4. Solaris

About the Timeout

Hello everyone I am a new one,I want to know how to get the solaris force the loginer out if he do not in a time thanks (4 Replies)
Discussion started by: lyh003473
4 Replies

5. Filesystems, Disks and Memory

timeout problem

Hi can anyone help with the following:- when sending large e-mails via a ssh session the job always times out every 5 min before the mail is sent, this means that a user has to tap a key to stop it timming out. Is there a way to stop this from happening. Numpty (4 Replies)
Discussion started by: numpty
4 Replies

6. Shell Programming and Scripting

Can we timeout cd command

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)
Discussion started by: dipashre
9 Replies

7. Shell Programming and Scripting

how to set timeout?

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)
Discussion started by: uativan
14 Replies

8. UNIX for Dummies Questions & Answers

rsh and timeout

hi, i have many ksh shell scripts running "rsh" command and sometimes the remote host doesn't answer so the rsh command doesn't return data and the script waits. How can i modify this to have a forced return to continue my script , a kind of controlled timeout ? thanks in advance... (0 Replies)
Discussion started by: Nicol
0 Replies

9. Shell Programming and Scripting

EXCEPT timeout problem

i am trying to write an except script to ssh into a list of devices and run some commands, and i came across this problem, not every device is alive, which breaks the script, my script looks like this #!/usr/bin/expect # set defaults set... (1 Reply)
Discussion started by: fedora
1 Replies

10. Shell Programming and Scripting

Timeout in shellscripting

#!/bin/sh for ip in $(cat /root/Desktop/ftp.txt) do HOST=$ip USER='bob' PASS='bob' ftp -n $HOST <<EOF user bob bob EOF echo "$ip" done the Above code i want to use check and verify login works on multiple ftp servers on my network. However the ftp servers are dynamic in setup... (5 Replies)
Discussion started by: Noledge
5 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 04:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy