I have a single script that was running fine in parallel on
now it has been upgraded to
and the script has started to fail unpredictably. Is this an upgrade issue? As the script runs fine for some parallel threads while fails for others. Please advise me on how to resolve this issue.
Well the script is fetching files from remote location to the local directory through SFTP. The script is correct because it still runs fine for some streams while it fails for others. fetch_file variable would be blank and the script fails to fetch remote file. Note that the remote system is not changed and if I run the script again individually (not when 29 other streams are running simultaneously) then it successfully fetches file from the remote IP!!
Please understand that I won't be able to paste the whole script but have posted only the snippet (while masking info about user, IP, etc.) where the problem occurs. I hope this is sufficient.
I assumed it to be more of a system issue than code issue and hence didn't post any code with it.......
If you suspect that the kernel upgrade is to blame (which I kind-of doubt), have you tried booting the system off the old kernel and running the script again? If the upgrade is to blame, it should run as it did before. Have you also checked the version of sftp? If the system has been upgraded (for example) with a yum update, openssh-clients (or the equivalent for your distribution) may also have been upgraded, and the problem could lie there - or within a myriad of libraries.
Well the script is fetching files from remote location to the local directory through SFTP. The script is correct because it still runs fine for some streams while it fails for others. fetch_file variable would be blank and the script fails to fetch remote file. Note that the remote system is not changed and if I run the script again individually (not when 29 other streams are running simultaneously) then it successfully fetches file from the remote IP!!
Please understand that I won't be able to paste the whole script but have posted only the snippet (while masking info about user, IP, etc.) where the problem occurs. I hope this is sufficient.
I assumed it to be more of a system issue than code issue and hence didn't post any code with it.......
Thanks.
I'm sorry, but in my experience, when a programmer tells me that code is correct because it runs fine some of the time, the most likely problem is that that code makes assumptions that are only true some of the time. And, especially when a programmer says his or her multithreaded code is correct because it works correctly when it is tested using a single thread, I have every reason to believe that the program is timing sensitive and any change to the system (added or reduced system load, new hardware, new software, etc.) may affect timing.
is failing without showing us how batch_file, remote_user, and remote_IP are being set. We have no idea what is in remote_file_list_1, but if there are sometimes whitespace characters in that file, it is highly likely that any use of sftp_file_name will fail to do what you intended.
You are not showing us where the problem occurs; you are telling us a line of code sometimes sets a variable to an empty string based on three variables that may have been set incorrectly by code we can't see.
You have the script. If you're convinced it is working correctly and won't let us see what is going on, there isn't anything we can do to help you.
Hi,
I'm trying to do teh below thing.
I have a single script which uses 3 different parameters to do 3 different work like belwo.
test1.sh par1 -- it shuts down an instance
test1.sh par2 -- it shuts down an instance
test1.sh par3 -- it shuts down an instance
Now I created a script... (7 Replies)
Hi Folks
I have a doubt. I have a script which is running with 2 input parameters
./GetDSLnkCount.sh <jobnumber> Parmfile.txt
I need to run the script in parallel for different jobnumbers. The commands are
./GetDSLnkCount.sh jnhuc14500 Parmfile.txt
./GetDSLnkCount.sh jnhuc14501... (3 Replies)
Hi All,
I have a huge collection of files in a directory about 200000. I have the command below but it only uses one core of the computer. I want it to do task in parallel.
This is the command that I want to run in parallel:
sort testfile | uniq -c | sort -nr
I know how to run sort... (10 Replies)
Hi,
I am using Tclexpect to automation testing on switches and using regexp and the buffer outputs the program is running well for one iteration and failing the second one... can anyone please guide me what is the mistake i am making?
Thanks
Here is the small version of the program,
while... (2 Replies)
I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Hi,
I am a shell script which takes input parameters and performs various functions. My concern is, if we call the same shell script with different parameter values from different sessions, will the results be inconsistent?
Are there any precautions I need to take inorder to avoid conflicts... (1 Reply)
I'm going to undertake a hardware refresh soon and I was wondering if it is possible to run two machines (X and Y) with the same hostname (but different IP addresses) on the same network? Server X is the original server and has an entry in DNS. Server Y is the new server and won't have an entry... (1 Reply)
Hi,
Iam having the scripts as follows. i jus want to run those in parallel.
main aim is to minimise the time for overall execution of the script.
now out.txt is having 1 lac records.
script1(split.sh)
split -1000 out.txt splitout
ls -A splitout* > filelist.txt
cat filelist.txt... (6 Replies)
hi ,
i need to run a parallel program .
for example;
program1
{
array=" the second program should called here : program 2"
the execution should continue
}
the 2nd program should recieve an array of information as argument and it should... (4 Replies)