Update : please excuse my following rant, it concerns
Win32::PerfLib, while
shonorio is really asking about
Win32::PerfMon , a module that I didn't know but actually exists.
It's still possible to access counters with Win32::PerfLib , but PerfMon looks much simpler .
----------
Hello,
The win32 perflib data structure is very close to hell !
If your are using Win32::PerfLib ( and not PerfMon as you say) the return value of the method you use has no sense other than failure (0) or success (anything but 0).
The interesting results are obtained in a hash that you pass as a reference in the call to the method.
Look at the docs :
$ok = Win32::PerfLib::GetCounterNames($server,$hashref)
Then you have a reference to an hash in $hashref .
The meanings of the keys of this hash are described in the docs.
It gets nasty because most of these keys point to other hashes that in turn point to hashes .
There is seven levels of such hashes in this so-called "structure" ...
... Don't use it if you don't have to ;)
Hope this helps,
zlr .
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.