This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Executing commands simultaniously, max n at a time

Help for those learning Tcl or writing their own scripts.
Post Reply
s
sander_vk
Voice
Posts: 4
Joined: Fri Jul 06, 2007 7:34 am

Executing commands simultaniously, max n at a time

Post by sander_vk »

I've been scripting in TCL/Expect and want to query multiple devices in a network.

In order to do this I've written executable shell scripts that do the querying on 1 device.

What I now need is a main script that receives as input a list of devices to query and then starts executing the already written scripts in parallel. When a script ends. Another instance of the script should start, keeping the running scripts at 10 until there are not enough devices anymore.

I've been doing some research and found that there are 3 possible ways to go:

Forking
Events
Threads

I now wonder what would be the best direction to go and where I can find some tutorial on it, as the sites I googled didn't have any handy examples to implement this.

Thanks!

Sander
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

... and what has this to do with eggdrop?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
s
sander_vk
Voice
Posts: 4
Joined: Fri Jul 06, 2007 7:34 am

Post by sander_vk »

Well not that much directly. It is about programming TCL. And I could use an eggdrop to execute the commands in parallel.

If you know a better forum to place my questions on I would be happy to post it there.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

The places listed here are far better suited for this question.
s
sander_vk
Voice
Posts: 4
Joined: Fri Jul 06, 2007 7:34 am

Post by sander_vk »

Thanks!
Post Reply