Operating System - HP-UX
1834587 Members
3562 Online
110069 Solutions
New Discussion

remsh - Is there any limit ?

 
Kevin Hill_2
Occasional Contributor

remsh - Is there any limit ?

Hi all,

I have a script which works on host1 and does a remsh to another host say host2 to check for a string "Recovery Complete" in my oracle alert log file.
The command I use in the script is as follows
RECO=`remsh host2 "tail -200 /oracle/PRD/saptrace/background/alert_PRD.log | grep 'Recovery Complete' | wc -l"`

This works fine. However sometimes when I change the value of the tail -200 to tail -600 I do not get the results I expect.

A simple
remsh host2 "tail -600 /oracle/PRD/saptrace/background/alert_PRD.log | wc -l"
returns less than 600. The value it returns sometimes is 450 sometimes 356.

Has anyone any idea why this happens ?

regards,
Kevin Hill
2 REPLIES 2
Kevin Hill_2
Occasional Contributor

Re: remsh - Is there any limit ?

Hi all,

The problem is the same on host2.
On host2 if I do a
tail -600 /oracle/PRD/saptrace/background/alert_PRD.log | wc -l

I still get a 356
Can anyone help me out ?

regards,
Kevin Hill
A. Clay Stephenson
Acclaimed Contributor

Re: remsh - Is there any limit ?

The tail command has an internal 20K buffer thus the number of lines you are able to captures depends upon the length of each line as well as the number of lines.
If it ain't broke, I can fix that.