The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
kill multiple instances of the same program ipzig Shell Programming and Scripting 12 12-16-2007 11:42 PM
detecting multiple instances ragha81 Shell Programming and Scripting 3 04-06-2007 07:09 AM
problem in creating executable for a client program konas High Level Programming 2 11-17-2006 11:09 AM
Multiple file instances gozer13 UNIX for Dummies Questions & Answers 1 12-29-2004 04:08 PM
multiple instances of syslogd - is it possible? Gary Dunn UNIX for Advanced & Expert Users 9 07-20-2004 06:10 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-24-2005
tushar_johri's Avatar
Registered User
 

Join Date: May 2005
Location: Mumbai,India
Posts: 7
Creating instances of a program

Hi,
Presently I have script #!/bin/ksh in which 4 executables are executed
as 1,2,3 and 4.Executable 2 is an extract program which extracts records from a table.and executable 4 is a program that updates a database.
Currenlty this process takes a hell lot of time and my aim is to reduce the overall execution time.
I want to change executable 2 to process only say 100 records.Suppose there 500 records in a database,I want to run 5 instances of executable 2 in parallel.I also want to make use of these 5 instances to update my database by passing the output of each of the 5 instances to executable 4.In other words,I also want to split executable 4 into same number of instances as executable 2.

I have another problem here :
I want to merge the output files of 5 sub program ,attach a header and trailer and then FTP it.Is this going to be time consuming ?

Can anybody help me how it is possible ? Is this approach correct to cut down the timing of the entire process ?
Please advise.
Thanks
Unixcurious

Link removed

Last edited by Perderabo; 05-25-2005 at 07:33 AM. Reason: Remove link
Reply With Quote
Forum Sponsor
  #2  
Old 05-25-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,298
We do this all the time for database batch processing.
The executables are going to have to be able to take parameters - from the command line, a file, or an environment variable. Then the parameter is passed into the executables as they run.

For example -

When we bill, the billing cycles are broken into 12 sub-cycles. This makes the process run ~12 times faster - if there are 12 cpu's and the database supports high volume transaction rates - we use Oracle. Our cycle bill time is 30 minutes instead of six hours.
pseudocode example:
Code:
bill 0100 &
bill 0101 &
....
bill 0111 &
When all the jobs are done we ftp the files over to another box to print bills.
Reply With Quote
  #3  
Old 05-25-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
tushar_johri, please don't post your webite link in a psuedo signature like that. You can post a link to your in our News, Links, Events, and Announcements forum if you want.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0