in reply to Re^4: How to improve memory usage in this script??
in thread How to improve memory usage in this script??

This should work, and it's better than the forking idea because it keeps the dispatcher busy with monitoring at least $MAXCONCURRENT requests at a time. Let us know if you still have memory issues with this approach.

Replies are listed 'Best First'.
Re^6: How to improve memory usage in this script??
by Anonymous Monk on Feb 05, 2008 at 09:56 UTC
    ok thx a lot for the script browseruk, thx for the fast response! ;). now when i run it it gave me an error "Can't "next" outside a loop block" so used while( ++$ips ){}; instead of the do(). now as for the memory usage, it now took a lot more. When at 10.0.43 it was already at 60mb and increasing.(remember that all i got so far is timeouts, so 60mb really is too much in my opinion) im interested in the fork method because of this "you can fork off one subnet at a time to a child process and its memory will get reclaimed when it exits.". so if i understood correctly, you would scan 255 ips with a child, then when done all thememory they used will get returned?. So, if the script takes 10mb scanning 10.0.0.0-10.0.0.255 the 10.0.0.0-10.0.1.255 scan should take aproximately the same??