in reply to A plethora of forks

The first thing that sticks out is your children are not exiting properly. Once they finish their job, they go back into the foreach loop and fork off new processes as if they were the parent. This causes numerous pings for each host. First thing to do then, is to add an exit call right after the child code...
for ( [snip] ) { $pid[$_] = fork; if ($pid[$_]) { [snip] } else { # ping some hosts exit; # <-- important that your children exit... } }

-Blake

Replies are listed 'Best First'.
Re: Re: A plethora of forks
by ginseng (Pilgrim) on Aug 31, 2001 at 10:06 UTC
    Wow. I looked the problem in the face, knew pretty well that the children weren't exiting, and never even thought about the fact I might have to tell them to exit.

    Thank you. That gets me so much closer.