- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Running a command Simultaniousely.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО08-23-2007 07:17 PM
тАО08-23-2007 07:17 PM
Running a command Simultaniousely.
I have a peculiar requirement.
I want to run a command, from within a script.
But, the catch is to run two instances of the same command, simultaniousely.
How can i do this ??
Regards,
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 07:29 PM
тАО08-23-2007 07:29 PM
Re: Running a command Simultaniousely.
command &
command &
wait # waits for both
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 07:31 PM
тАО08-23-2007 07:31 PM
Re: Running a command Simultaniousely.
command &
command &
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 07:42 PM
тАО08-23-2007 07:42 PM
Re: Running a command Simultaniousely.
I have already tried this ...
Sorry, i forgot to add ome more point, this perticular command dosen't take any time to execute ..... !!!
And the important condition with my command is, the secand instance should fail, pointing that another instance of the command is running ..
(the time lag for the command is almost non-existeant)
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 08:05 PM
тАО08-23-2007 08:05 PM
Re: Running a command Simultaniousely.
Then you will have to modify your command to detect this. Create a lock file with the PID of the first in a file? Using $! after you background a command will give its PID.
>(the time lag for the command is almost non-existent)
What are you trying to do, write a test case?
Or do real work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 09:33 PM
тАО08-23-2007 09:33 PM
Re: Running a command Simultaniousely.
Its a TeMIP (OV Product) fcl command.
The command itself has a in-built mechanism to look for running proceses. It fails, if it detects the command running. But, the problem is, it dosen't time to execute & come out ...
But, we have to produce a test case scenario for this ..
Regards,
Ramesh.K.R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2007 09:52 PM
тАО08-23-2007 09:52 PM
Re: Running a command Simultaniousely.
Then try a wrapper around your fcl.
In the wrapper, you will spin in a loop checking to see if a file exists. If it does, then execute fcl.
# wait for signal-file
while [ ! -f signal-file ]; do
: nothing here to see
done
fcl ...
Then do:
wrapper-command &
wrapper-command &
sleep 5 # make them work up a sweat
touch signal-file
Both wrappers should start up fcl about the same time.