Re: Kicking off multiple processes at once instead of waiting....
- From: "Simon" <shmh@xxxxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 11:36:22 GMT
Thanks Joe..much appreciated.
I do know Joe how to connect to a remote registry.
I spose what Im trying to do, but cant get myself on some really really
simple examples, so i can play with them, are example scripts on how to fork
a process.
Ive looked at the perldoc but I find the doco not as clear as some good
beginner fork examples so I can test them out on my systems, then gain
confidence that way.
Appreciate your help. :)
"Joe Schaefer" <joe+usenet@xxxxxxxxxxxxxx> wrote in message
news:876457m37u.fsf@xxxxxxxxxxxxxxxxxxxxxxxx
"Simon" <shmh@xxxxxxxxxxxxxx> writes:
What Id like to be able to do, because we have so many machines to
process, is to do the following...
Connect to, say 10 machines all at the same time, then return data
back to the one main console (where I executed the script in the first
place), instead of waiting for 1 machine to end, then move on to the
next.
Any help greatly appreciated. Here is the script.
================================================================= Script
use Win32;
use Win32::Registry;
[...]
system ("net use \\\\$SystemName\\ipc\$ "password"
/user:$SystemName\\useraccount > NUL");
sleep 3;
RunRegQuery();
system ("net use \\\\$SystemName\\ipc\$ /delete /y > 2NUL > NUL"); #
Delete
previous connection
What you want to do sounds fine, but personally I don't think you're
asking the right question. What you should be asking is "How do I get
rid of these system() calls in my script?", because there's no way
to parallelize your script without doing at least that.
If I were you, I'd be looking over the Win32::Registry documentation
for a way to directly connect to a remote registry. If you can figure
out how to do that, you should be able to access the repository by
calling a suitably modified version of
RunRegQuery($SystemName);
without ever needing to make those calls to system() and sleep().
If it turns out *that* script isn't fast enough, at that point people
will be able to give you advice on how to parallellize it like you
have originally asked.
--
Joe Schaefer
.
- References:
- Kicking off multiple processes at once instead of waiting....
- From: Simon
- Re: Kicking off multiple processes at once instead of waiting....
- From: Joe Schaefer
- Kicking off multiple processes at once instead of waiting....
- Prev by Date: Re: uninitialized value in a sort block
- Next by Date: Re: uninitialized value in a sort block
- Previous by thread: Re: Kicking off multiple processes at once instead of waiting....
- Next by thread: Adding a line in a file inside many directories
- Index(es):
Relevant Pages
|
|