Hi Monks,

As per my requirement that is "I need to write a script in perl by using multithreading concept where i need to ping 500 server continousely at an interval of 60 sec".

For Example:
In my network if i have 500 servers and i need to ping each server at a interval of 60 seconds (i was using an infinite loop to ping these serevr as per the ping interval).

According to the above scenario i opened 500 threads to ping the 500 server and where each thread which will be executing continousely at an interval of 60 seconds as per the requirement. But when i run the script i observered that after 100 or 120 threads,the threads are terminated automatically.

My question is:
1) Why the threads are terminating after 100 or 120 threads. Is there any other way to ping a server continousely by using threads continousely.


Thanks In Advance.



In reply to Pinging server using multithreading concept by nagivreddy93

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.