Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

getting Win32 perf counters from a Unix box

by jptxs (Curate)
on Feb 16, 2002 at 01:15 UTC ( #145797=perlquestion: print w/ replies, xml ) Need Help??
jptxs has asked for the wisdom of the Perl Monks concerning the following question:

After a few trys, I've figured out I can't seem to install any of the Win32 modules on my linux box (maybe that's a problem unto itself, but I suspect not). Perhaps I'm silly for thinking I could. But I'm faced with having to try and retrieve win32 perf counters from a linux box, or, at least, some unix box. I've been searching for a while and not finding a solution. Perl seems the natural choice, but does anyone have an idea if/how it could be done?

We speak the way we breathe. --Fugazi

Comment on getting Win32 perf counters from a Unix box
Re: getting Win32 perf counters from a Unix box
by gav^ (Curate) on Feb 16, 2002 at 01:53 UTC
    I'm assuming the won't work as they are probably just wrappers over Win32 API calls. My best suggestion would be to create a server (SOAP?) on the Win32 box that you can talk to from your linux box to get the info you need.

    gav^

      That is correct sir, well roughly.
    • Many performance counters are exposed in the registry INSERT(HKEY_DYN_DATA\PerfStats)
    • Win32 is too general, NT and 9x differ greatly in their counters. For an example try running this (one of my favorite apps) on different Win32 platforms.
    • I can speak most authoritatively about NT, as I used this chez my former employer. There is a (nonstandard on 4.0 IIRC) Microsoft dll (perf something or other) that provides the basic hooks for this. It was required for both VB and Java apps that accessed the performance data.
    • --
      perl -pe "s/\b;([st])/'\1/mg"

      that would work, except that I have to be able to pull the counters without touching the configuration of the server. I just don't think it can be done by any out of the box or off the internet solution right now. I'll be sure to update thread if I break it down...

      We speak the way we breathe. --Fugazi

Re: getting Win32 perf counters from a Unix box
by marillus (Initiate) on Feb 17, 2002 at 12:15 UTC
    Hmmm, I don't know if this helps you any, but you can access nt performance counters via snmp, at least via an hack. try this link: snmp4tpc You can create your own MIB for performance counters via an utility that comes with the NT Option pack. The Downside however is, that at least with nt4, the whole thing won't work with Multiprocessor boxes. Also you might wanna look at the way cricket(Cricket perfmon) does perfmon data gathering, written in perl, this might just be, what you are searching for

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://145797]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-09-02 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls