I have come up with...

#! perl -w
use Win32::PerfLib ;
($server) = @ARGV ; # Uses local host if blank
# Reads list from HKLM\Software\Micrsoft\Windows
NT\CurrentVersion|Perflib\009\
Win32::PerfLib::GetCounterNames($server, \%counter) ;
# Reverses the hash
%r_counter = map { $counter{$_} => $_ } keys %counter ;
# Gets the Integer for the counter Requests Queued
$process_id = $r_counter{'Requests Queued'} ;
# Connects to performance data of the server
$perflib = new Win32::PerfLib($server) ;
# Gets the value coorresponding to the Interger
$value = {} ;
$perflib->GetObjectList($process_id, $value) ;
# Closes the connection
$perflib->Close($value) ;
# Prints the integer and the value
print("\n$process_id\n$value\n") ;

When I run it I get the following output...
2164                                <- this is the number that appears
directly before the counter in the registry
HASH(0xe7b930)       <- is this where you use
Win32::PerfLib::GetCounterType(CounterType)  ??  How??

If I can convert this HASH(0xe7b930) to an integer, I can act upon the
results with some previous monitoring code I am using.  I can't find the
calc.html mentioned with Win32::PerfLib.  Any idea where I might find it?

Thank you for your patient help!!

Glenn Meyer

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to