![]() |
|
more useful options | |
PerlMonks |
controling the num of fork sessionsby Anonymous Monk |
on Nov 27, 2000 at 02:50 UTC ( [id://43414]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
<html>
<head>
</head>
<body>
I need to run a single command on multiple boxes. I am pulling the cpu name from an array then plugging them into a loop. I am then forking the loop so that all of them run at once.<o:p></o:p> The problem that I am experiencing is: Is there a way to control the number of sessions made at once by the looped fork? <o:p></o:p> If I am running the command on 20 servers I am OK. However, if I need to run it on all 2000 of the boxes, then I run into MAJOR system resource problems. As a temprary fix I am forking 20 of them, then running 1 outside of the fork. When the 1 from outside of the fork ends then the whole process starts over. This allows me to do them in CHUNKS of 20. What I am looking for is a way that allows a new session to start whenever one ends, so that I have a CONSTANT streem of 25 sessions NOT chunks of 25.<o:p></o:p> Thanks, BRN </body> </html>
Back to
Seekers of Perl Wisdom
|
|