HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Execute 10 scripts concurrently.
Operating System - HP-UX
1830165
Members
2545
Online
109999
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 03:08 AM
12-03-2004 03:08 AM
Execute 10 scripts concurrently.
Hi all,
For load stress testing I need to run about 10 or more SQL script files in batch mode simultaneously and concurrently from Unix Shell on our Oracle database Server.
Psoft1.sql, Psoft2.sql ,….., Psot10.sql
What would be the best way to do this?
Thanks,
Gulam
For load stress testing I need to run about 10 or more SQL script files in batch mode simultaneously and concurrently from Unix Shell on our Oracle database Server.
Psoft1.sql, Psoft2.sql ,….., Psot10.sql
What would be the best way to do this?
Thanks,
Gulam
Everyday Learning.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 03:11 AM
12-03-2004 03:11 AM
Re: Execute 10 scripts concurrently.
Use another script to send them all into the background:
Psoft1.sql &
Psoft2.sql &
.
.
.
Psoft10.sql &
Pete
Pete
Psoft1.sql &
Psoft2.sql &
.
.
.
Psoft10.sql &
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 04:11 AM
12-03-2004 04:11 AM
Re: Execute 10 scripts concurrently.
Launch copy scripts from a single script with function defined in base script:
##
# wcshps06:~/scripts/cpio_copy.ksh SDA 10/29/03
#
# Copy two filesystem at once.
#
function cpio_copy
{
FromDir=$1
ToDir=$2
cd $FromDir
date
find . -xdev -depth | cpio -ocax | \
remsh wcshps08 "cd $ToDir ; cpio -icduxm"
date
}
cpio_copy /u413/from /u413/to &
cpio_copy /u425 /u425 &
Launce copy scripts with nohup. Send output to log file.
nohup /var/admtools/copy_script1.ksh 2>&1 >/tmp/log1 &
nohup /var/admtools/copy_script2.ksh 2>&1 >/tmp/log2 &
Notes on Foreground/Background:
17. FOREGROUND/BACKGROUND
a. When you run interactively and you type:
prog
you are running in the foreground.
b. Background:
prog &
c. nohup
nohup prog &
runs to completion in the background with output going to nohup.out.
nohup prog < input file > output_file 2>error_file &
You must use the fully qualified path name for "prog".
d. wait
If you submit a background job from a shell, and want to
the shell to wait until the background job(s) completes,
you use the command:
wait
where pid is optional..
d. EXAMPLE:
stuart@perdita:/users2/bianca/stuart$ lrom &
[1] 8187
Term recognized as HPterm
[1] + Stopped (tty output) lrom &
stuart@perdita:/users2/bianca/stuart$ psg lrom
stuart 8198 8187 0 11:01:02 pts/0 0:00 /opt/lrom/lbin/lromc800
stuart 8187 8171 0 11:01:01 pts/0 0:00 lrom /opt/lrom/bin/lrom
stuart@perdita:/users2/bianca/stuart$ jobs
[1] + Stopped (tty output) lrom &
stuart@perdita:/users2/bianca/stuart$ kill %1
[1] + Terminated lrom &
stuart@perdita:/users2/bianca/stuart$
e. Job Control:
bg PID move to background
fg PID move to foreground
jobs list jobs
kill [signal] PID | %jobno
wait PID
##
# wcshps06:~/scripts/cpio_copy.ksh SDA 10/29/03
#
# Copy two filesystem at once.
#
function cpio_copy
{
FromDir=$1
ToDir=$2
cd $FromDir
date
find . -xdev -depth | cpio -ocax | \
remsh wcshps08 "cd $ToDir ; cpio -icduxm"
date
}
cpio_copy /u413/from /u413/to &
cpio_copy /u425 /u425 &
Launce copy scripts with nohup. Send output to log file.
nohup /var/admtools/copy_script1.ksh 2>&1 >/tmp/log1 &
nohup /var/admtools/copy_script2.ksh 2>&1 >/tmp/log2 &
Notes on Foreground/Background:
17. FOREGROUND/BACKGROUND
a. When you run interactively and you type:
prog
you are running in the foreground.
b. Background:
prog &
c. nohup
nohup prog &
runs to completion in the background with output going to nohup.out.
nohup prog < input file > output_file 2>error_file &
You must use the fully qualified path name for "prog".
d. wait
If you submit a background job from a shell, and want to
the shell to wait until the background job(s) completes,
you use the command:
wait
where pid is optional..
d. EXAMPLE:
stuart@perdita:/users2/bianca/stuart$ lrom &
[1] 8187
Term recognized as HPterm
[1] + Stopped (tty output) lrom &
stuart@perdita:/users2/bianca/stuart$ psg lrom
stuart 8198 8187 0 11:01:02 pts/0 0:00 /opt/lrom/lbin/lromc800
stuart 8187 8171 0 11:01:01 pts/0 0:00 lrom /opt/lrom/bin/lrom
stuart@perdita:/users2/bianca/stuart$ jobs
[1] + Stopped (tty output) lrom &
stuart@perdita:/users2/bianca/stuart$ kill %1
[1] + Terminated lrom &
stuart@perdita:/users2/bianca/stuart$
e. Job Control:
bg PID move to background
fg PID move to foreground
jobs list jobs
kill [signal] PID | %jobno
wait PID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2004 04:14 AM
12-03-2004 04:14 AM
Re: Execute 10 scripts concurrently.
Like this:
for sqlscript in /path2scripts/*.sql
do
sqlplus /nolog @$sqlscript &
done
Ensure a proper "connect" at the beginning and a proper "exit" ath the end of each script.
Happy stressing
Volker
for sqlscript in /path2scripts/*.sql
do
sqlplus /nolog @$sqlscript &
done
Ensure a proper "connect" at the beginning and a proper "exit" ath the end of each script.
Happy stressing
Volker
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP