Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello All, Here's my question: I'm trying to ping about 1500 to 2000 machines in our environment, but instead of having 1 system command pinging each machine, I'd like to have 4 or even 8 system commands running simultaneously, which can decrease the amount of time to ping all the machine significantly. Is this possible through perl?

Replies are listed 'Best First'.
•Re: Running Simultaneous Commands
by merlyn (Sage) on Oct 30, 2002 at 20:17 UTC
Re: Running Simultaneous Commands
by erasei (Pilgrim) on Oct 30, 2002 at 20:05 UTC
    With perl 5.8's new iThreads you could easily write up a quick multi-threaded script that could use X amount of threads, each one pinging a machine. For more info, check out the perlthrtut.

    However, this is obviously for tracking servers/machines remotely to make sure they are still alive, in which case, this wheel has been invented many times before, and much better than it could be written by a single person in any usable time frame.

    Windows: What's Up Gold works pretty well, very graphical and boss-friendly (ooo, pictures!).

    *nix: There are several, I have used both NOCOL and Big Brother. Choose whichever one works best for your needs.

Re: Running Simultaneous Commands
by sauoq (Abbot) on Oct 30, 2002 at 20:15 UTC

    Sounds like a job for fping.

    "My two cents aren't worth a dime.";
Re: Running Simultaneous Commands
by Nitrox (Chaplain) on Oct 30, 2002 at 20:02 UTC
    What type of environment is this and what 'bookkeeping' are you looking to do with the results from ping? There are much better solutions for availability monitors.