NTAccess.Performance Readme

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 Connection
To 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>"
next
this 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>"
next
this gives
Messages in Queue
Bytes in Queue
Messages in Journal Queue
Bytes in Journal Queue
Now 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>"
next
returns
\MSMQ Queue(Computer Queues)\Bytes in Queue : 0
\MSMQ Queue(Computer Queues)\Messages in Queue : 0


Object Properties / Methods
Objects
  • NTAccess.Performance, main object is created using CreateObject("NTAccess.Performance")
    • AddCounter ( CounterName ), Adds a new counter to the list of counters to be monitored
    • DeleteCounter ( CounterName ), Removes the specified counter from the monitoring list.
    • Counter ( CounterName ) as Counter, returns a Counter object for the specified CounterName, only counters that have been added to the monitoring list (via a call to AddCounter) can be retrieved.
    • Counters, This returns a collection of Counter objects, one for each counter in the monitoring list.
    • Clear, Remove all counters from the monitoring list.
    • Available ( Path, ReturnFullPath ) as Strings, this function allows the available performance counters to be browsed. Path specifies a partial path ( i.e. an object, or an object and instance ), ReturnFullPath specifies whether the returned strings are in full path format ( e.g. \Object(0)\Counter ) , or relative to the path specified ( e.g. Counter ). To retrieve the list of available objects specifify a blank Path.

  • PerfItem Object Represents a single Performance Counter in the monitored collection
    • Name, the fully qualified name of the counter.
    • Value, the current reading of this counter.


    Last Updated : Wednesday, January 13, 1999
    (C) 1997 - 1999 Simon Fell, All rights reserved