1833723 Members
3830 Online
110063 Solutions
New Discussion

Remsh hanging

 
Pankaj Agrawal
Occasional Advisor

Remsh hanging

The following command hangs sometimes.

remsh node -l root -n ps -ef|grep XYZ|grep -v grep

As a result we need to abort the script execution. The surprising part is that the command works many a times also.

Cud anyone elaborate on this ??
6 REPLIES 6
bhoopathi_1
Frequent Advisor

Re: Remsh hanging

Can you check if the remote node is running normal. If the system response of the remote host is poor, you may face the same problem. Also can you check if your network connectivity to the remote is fine.
Pankaj Agrawal
Occasional Advisor

Re: Remsh hanging

Thx Bhoopathi...
Your suggestions do make sense..But prior to the remsh execution, we are checking the node availability using Ping.Thus the remote command is executed only if the node is available..
Thus somethg else is contributing to the problem.
Stephen Keane
Honored Contributor

Re: Remsh hanging

Try the following command

remsh node -l root -n ps -ef | tee your_file | grep XYZ | grep -v grep

(all one line)

This will create a file locally called your_file (or whatever you want) which will be overwritten each time the command is run. Take a copy of the file if the command runs successfully and compare it to the contents of the file when the command hangs, it might give you a clue.

As an aside, remsh hangs if the command is interactive (which yours isn't) or becomes interactive. I can't immediately see why a ps would become interactive though. Might be a red herring.
Laurent Menase
Honored Contributor

Re: Remsh hanging

Hi,

What os version and what ARPA transport patch?
on 11.0 a similar case existed with an old patch.

Muthukumar_5
Honored Contributor

Re: Remsh hanging

Why don't you try as like,

remsh node -l root -n "ps -ef" | grep XYZ | grep -v grep

so that,

ps -ef operation will be done in remote machine and grep operations will be done in local machine.


Which OS you are using.?

HTH.
Easy to suggest when don't know about the problem!
Pankaj Agrawal
Occasional Advisor

Re: Remsh hanging

The problem was diagnosed to be at the network level. There was nothing wrong with the command as such.