The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-04-2008
tcskurra tcskurra is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 2
Question Shell program to accept multiple request at the same time

Hi,

I got a script which sends the Email to the user based on certain variables received from Tivoli Server Monitoring 6.1.
Now to keep track of the mails I have wrote a stored procedure in DB2 as we use DB2 UDB as back end which take the variables that were used to send the mail and store it in the table.

I am calling this store procedure from a Shell program and for every mail sent using the script i call the shell program by passing the variables that is used to send the mails,which in turn is passed to DB2 stored procedure.

I also have a Log file which will store timestamp and other information of all mails that were successfully sent.

It’s working perfectly fine.

But my problem is when i tally the data from the DB and the data in the log file my DB always have a lesser number as compared to the log file. I am sure the log file is not having any duplicates.

When I compared the log file data and the Data in the Database I found that if Multiple request are coming at the same time, shell program is unable to process all of them.

That is if I get 5 requests at same time shell file is able to only process 1 request or max 2 or 3 request it is dropping other 3 or 2 requests.

How do I fix this. How can I make my shell program process multiple requests.


Thanks in advance.

Regards
Praveen