Actually what you will get for calling Win32::Perflib is a massive structure made of hash of hash of hash ... up to 7 levels. This structure contains everything that the performance monitor service of Win32 is able to collect, and that includes global cpu load (per CPU on a SMP system, but there maybe also a grandtotal) . Your problem will be to find where it is !

I found that the perflib struct was almost impossible to understand so i had to test thing many times in order to get the info i wanted from it . Dave Roth has some example scripts on his "roth consulting" site, he wrote the "Win32 perl programing" New Riders book (which i don't recommand by the way, it's close to useless )

I don't think you can assess the cpu impact of a job (that is a pool of process) through perflib, and you will still have to add the load of the different forked process.

About forking without Win32::Jobs, the only thing i can say is: even IPC::Open3 didn't work very well for me and that's standard in the active state distribution ! You can't even pass filehandles to the forked process. My feeling is that if you want to run under windows you had better use the windows way ...


In reply to Re^3: Checking system cpu load when forking? by Anonymous Monk
in thread Checking system cpu load when forking? by mattr

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.