for few server it might take hour, ... idea is to collect data after every 10 minutes or 30 minutes,

So, you going to collect data that takes an hour to query, every 10 or 30 minutes.

depends on interval time or we can decide the best way.

What is "the interval time"? Like, a value you choose to program? In which case, how is that different from "or we can decide the best way."?

Reading between the lines, what I think you are saying is; "as often as possible"? If so, that is good, because it is very easy to program "as often as possible".

But if it is imperative that server X be serviced every 10 minutes; and server Y every 30 minutes; and server Z every 19.27071 minutes; things get much, much more complicated.

idea is to collect data after every 10 minutes or 30 minutes, from each server

"the idea"? This sounds like a "suck thumb and wave finger in air" metric. And that is no basis upon which to make design decisions.

So far, there is so much contradiction in your 'spec', it is pretty much impossible to make any real assessment of whether a single, multi-threaded program is a suitable way of tackling the problem. You'll need to be a lot clearer in specifiying the actual requirements, rather than speculative "it would be nice ifs".

Another question: why are you considering threads rather than processes?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

In reply to Re^11: Thread Design help by BrowserUk
in thread Thread Design help by perlCrazy

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.