[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linrad] Re: Resources



http://nenya.ms.mff.cuni.cz/publications/Bulej-WritingProbes.pdf

Accessed via registry
 o  allows obtaining information from another host
 o  named performance objects and counters
 o  performance objects group related counters
 o  counters may have multiple instances
Issues to consider
 o  binary data, suitable for machine processing
 o  navigable, fixed, self-describing format
o complex interface (lots of pointer arithmetics), support library exists (pdh.dll)
 o  requires traversal after every snapshot
 o  retrieve multiple objects in a single snapshot
 o  may require memory allocation during snapshot
Locating and retrieving the information
 o  include <winperf.h>, <winreg.h> and link with ADVAPI32
 o  query registry the number of available objects
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Perflib, LastCounter o retrieve english object names, find indices of required objects and counters HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Perflib\009, Counter
 o  retrieve data for given performance objects
       HKEY_PERFORMANCE_DATA
 o  traverse the binary structure to find the counters and their data

Unfortunatly it appears that the support library pdh.dll and associated include files are not in MinGW, so it has to be done the hard way.. Here is an intersting page on using pdh though:

http://www.experts-exchange.com/Programming/Programming_Platforms/Win_Prog/Q_20227047.html

It is by no means clean and simple...

73

Brian


Joe Taylor wrote:

Bill --

Linrad is a complicated program with very tight real-time constraints. As a consequence, Leif prefers a lean-and-mean approach in which one can
understand, at a detailed level, as much as possibly of what is going on.

If the access to the Registry is required, so be it. If you can produce a simple C routine that wraps the necessary system calls and produces a fractional CPU load, so that another C routine can access it, I am sure that Leif would greatly appreciate it!

With best wishes,

    -- 73, Joe, K1JT

Bill Tracey wrote:

Don't know that there is a single call to do it .. the Pdh/registry stuff can do it from straight C -- takes a few calls though. What's the issue with looking in the Registry?

Cheers,

Bill (kd5tfd)

At 09:08 PM 8/25/2005, Joe Taylor wrote:

Thanks, Bill. I have found references like the URL you kindly provided.

What we are looking for, I'm afraid, is a way to get at the desired information from "plain old C". No C#, no .Net, no Registry, just a plain vanilla system call. As far as I can tell, one does not exist in Windows.
                        -- Joe, K1JT


#############################################################
This message is sent to you because you are subscribed to
 the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx> To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>


#############################################################
This message is sent to you because you are subscribed to
 the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx>
To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>

LINRADDARNIL
p