| NTAccess.Performance: An ASP Component for monitoring NT performance counters Version : 1.0 Beta 1 Release Date : 9 January 1999 Copyright (c) 1999 by Simon Fell. All rights reserved. Contact: email : Simon Fell WWW : Zaks Solutions Web Site If you have any problems using this component please report it. Description This component allows the NT performance counters to be browsed and monitored via a simple COM interface. Although designed with ASP in mind, the component can be used from any tool that supports COM (including VB, VC++ & WSH) Installation Instructions To use this ASP component move the two DLLs into a sub directory (like \winnt\system32\inetsrv\asp\Cmpnts or \winnt\system32) and run (from the directory copied to) regsvr32 nta_performance.dll If you are replacing an earlier version, remember to shutdown & restart IIS to reload the new version. (run "net stop iisadmin /y" followed by "net start w3svc" from a command prompt). License Agreement NTAccess.Performance is copyright (C) 1999 by Simon Z. Fell This component is free to use for none comercial use. You may NOT redistribute the package through BBS, Internet, FTP sites or by any other means without written permission from the Author. You are prohibited from: charging a fee or requesting donations for the package; distributing/including the package in commercial products or for commercial gain (without first getting a commercial license); modifying the package. All trademarks/registered names acknowledged. NTAccess.Performance is provided as is, without warranty of any kind. The author shall not be liable for damages of any kind. Use of this software indicates you agree to this. How To Use an example ASP application is included in the download, but in general you use the available function to browse the list of available performance objects and counters, add selected counters to the monitoring list (via AddCounter), and read the current values using either the counter function (to retrieve a single counter) or the counters collection to retrieve the current set of counters. For Example
set perf = Server.CreateObject("NTAccess.Performance")
for each PerfObject in perf.Available( "", false )
response.write PerfObject & "<BR>"
next
This produces a list similar to
System Processor Memory Cache PhysicalDisk LogicalDisk Process Thread Objects Redirector Server Server Work Queues Paging File Browser MSMQ Service MSMQ Queue RAS Port RAS Total Telephony NBT ConnectionTo see the list of available instances, call Available again, this time specifiying the required object, for each PerfObject in perf.Available( "MSMQ Queue", false ) response.write PerfObject & "<BR>" nextthis gives Computer Queues zaks\private$\admin_queue$ zaks\private$\order_queue$ zaks\private$\notify_queue$finally to see the list of counters, specify the object and instance. for each PerfObject in perf.Available( "MSMQ Queue(Computer Queues)", false ) response.write PerfObject & "<BR>" nextthis gives Messages in Queue Bytes in Queue Messages in Journal Queue Bytes in Journal QueueNow to monitor the counters you are interested in, add them to the monitoring list, by calling AddCounter, specifying the full counter path, perf.AddCounter("\MSMQ Queue(Computer Queues)\Bytes in Queue")
perf.AddCounter("\MSMQ Queue(Computer Queues)\Messages in Queue")
and to view the values of all the added counters, call the counters function
for each counter in perf.Counters response.write counter.name & " : " & counter.value & "<BR>" nextreturns \MSMQ Queue(Computer Queues)\Bytes in Queue : 0 \MSMQ Queue(Computer Queues)\Messages in Queue : 0 Object Properties / Methods Objects
|