Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Running Simultaneous Commands

by Anonymous Monk
on Oct 30, 2002 at 19:54 UTC ( #209210=perlquestion: print w/replies, xml ) Need Help??

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.

    -sauoq
    "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.

    -Nitrox

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://209210]
Approved by JaWi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2023-12-04 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?