First, a tiny (or not so tiny) remark on your question...

Are you sure you want to do it, or do you just want us to do it for you? Have you done any code so far that got you stucked so you can share some specific problems that we can actually help you with? Do you at least have a plan on how to do it?

Don't take this the wrong way, but please read Is PM a good place to get answers for homework? and How (Not) To Ask A Question before posting this kind of questions - and don't be offended by the links' titles, they actually have good pointers on how to ask a question so people can help you (instead of just work for you or not understand your question or simply ignore you).

Now, on to your question, ...

...you should take a look at Sys::Info::CPU as it works for both Windows and Linux, and even has a nice compatibility layer in case you want to give support for other OS'es too.

To find CPU usage of remote machines you'll probably have to create a client/server program in order to make it portable through different OS'es using something like SOAP::Lite or plain Sockets (if you want to get hardcore ;-)

Hope this helps!


In reply to Re: find CPU utilization + Perl + XP by garu
in thread find CPU utilization + Perl + XP by isha

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.