Monitoring Zen Servers with DTO
The following topics provide information about the objects that comprise the monitoring group of the Distributed Tuning Objects:
DtoMonitor Object
This object provides usage information about a Zen server. It is the root object of all other monitoring operations.
Properties
CurClients
Returns current number of clients for a session.
CurFilesInUse
Returns current number of files in use for a session.
CurHandlesInUse
Returns current number of handles in use for a session.
CurLicensesInUse
Returns current number of licenses in use for a session.
CurLicDataInUseMB
Returns current value in megabytes (MB) of data in use. DTO2 only.
CurLocksInUse
Returns current number of locks in use for a session.
CurSessionCountInUse
Returns current number of sessions in use (current session count). DTO2 only.
CurThreads
Returns number of threads for a session.
CurTransInUse
Returns current number of open transactions for a session.
EngineUpTimeSecs
Returns how long in seconds the database engine has been running. DTO2 only.
MaxClients
Returns maximum number of clients for a session.
MaxFiles
Returns maximum number of files for a session.
MaxHandles
Returns maximum number of handles for a session.
MaxLicenses
Returns user license count for a session.
MaxLicDataMB
Returns maximum allowed size in megabytes (MB) for data in use (data in use limit). The hex value 0xFFFFFFFF means unlimited. DTO2 only.
MaxSessionCount
Returns maximum number of sessions allowed by a license (session count limit). The hex value 0xFFFFFFFF means unlimited. DTO2 only.
MaxThreads
Returns maximum number of threads for a session.
MaxTrans
Returns maximum number of transactions for a session.
PeakClients
Returns highest number of clients for a session
PeakFilesInUse
Returns highest number of files in use for a session
PeakHandlesInUse
Returns highest number of handles in use for a session
PeakLicensesInUse
Returns highest number of licenses in use for a session
PeakLicDataInUseMB
Returns peak value in megabytes (MB) of concurrent data in use. DTO2 only.
PeakLocksInUse
Returns highest number of locks in use for a session
PeakSessionCountInUse
Returns peak number of concurrent sessions in use. DTO2 only.
PeakThreads
Returns highest number of threads for a session.
PeakTransInUse
Returns highest number of transactions in use for a session.
Collections
Objects
Methods
None
Example
' Instantiate session and connect to server
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Now get DtoMonitor object from DtoSession
Dim session_monitor as DtoMonitor
Set session_monitor = my_session.Monitor
 
' Now get current files in use
Dim current_files as long
current_files = session_monitor.CurFilesInUse
See Also
DtoOpenFiles Collection
A collection of DtoOpenFile objects representing currently open files.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a DtoOpenFiles collection.
Methods
None
Remarks
Use the Count property to find the number of members in the collection.
You can obtain a DtoOpenFiles collection through the properties of the DtoMonitor Object object.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get open files from monitor
Dim my_openfiles as DtoOpenFiles
Set my_openfiles = my_monitor.OpenFiles
See Also
DtoOpenFile Object
An object representing an open file.
Properties
ActiveCursors
Returns number of active cursors for an open file.
AFLIndex
Returns AFL Index for an open file.
ContinuousOps
Returns whether an open file is using continuous operations.
FileName
Returns file name associated with an open file.
IsLocked
Returns whether an open file is locked.
0 = Not locked
1 = Locked
IsReadOnly
Returns whether an open file is read-only.
0 = Not read-only
1 = Read-only
IsTrans
Returns whether an open file is in a transaction state .
0 = No
1 = Yes
Monitor
Returns DtoMonitor object associated with the open file.
OpenMode
Returns open mode of the open file.
OpenModeName
Returns a text version of OpenMode.
PageSize
Returns page size of an open file.
PhysFileSizeKB
Returns physical size of the file in kilobytes (KB). DTO2 only.
ReferentialIntegrity
Returns whether referential integrity is set for an open file.
0 = No
1 = Yes
TimeStamp
Returns time stamp of an open file.
TTSFlag
Reserved for future use.
Methods
None
Collections
Remarks
This object represent a currently opened file. For a collection of all open files, use the DtoOpenFiles Collection.
Example
Dim my_session as new DtoSession
Dim is_read_only as Boolean
Dim my_monitor as DtoMonitor
Dim my_openfiles as DtoOpenFiles
Dim first_file as DtoOpenFile
Dim result as DtoResult
 
result = my_session.Connect("myserver", "username", "password")
Set my_monitor = my_session.Monitor
Set my_openfiles = my_monitor.OpenFiles
Set first_file = my_openfiles(1)
is_read_only = first_file.IsReadOnly
See Also
DtoFileHandles Collection
A collection of DtoFileHandle objects representing all the file handles for an open file.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a DtoFileHandles collection.
Methods
None
Remarks
Use the Count property to find the number of members in the collection.
Example
Dim my_session as new DtoSession
Dim my_monitor as DtoMonitor
Dim my_openfiles as DtoOpenFiles
Dim first_file as DtoOpenFile
Dim my_handles as DtoFileHandles
Dim result as DtoResult
 
result = my_session.Connect("myserver", "username", "password")
Set my_monitor = my_session.Monitor
Set my_openfiles = my_monitor.OpenFiles
Set first_file = my_openfiles.Item(1)
Set my_handles = first_file.FileHandles
See Also
DtoFileHandle Object
An object representing a file handle for an open file.
Properties
ClientIndex
Returns index for a file handle.
IsLocked
Returns whether a file handle is locked.
IsWaiting
Returns waiting status for a file handle.
OpenMode
Returns open mode for the file handle.
OpenModeName
Returns a text version of OpenMode.
TransState
Returns transaction state.
UserName
Returns user name associated with the file handle.
Methods
None
Remarks
Use the DtoFileHandles Collection to obtain a list of all file handles for an open file.
Example
Dim my_session as new DtoSession
Dim my_openfiles as DtoOpenFiles
Dim first_file as DtoOpenFile
Dim my_handles as DtoFileHandles
Dim first_handle as DtoFileHandle
Dim locked_state as Boolean
Dim result as DtoResult
 
result = my_session.Connect("myserver", "username", "password")
Set my_monitor = my_session.Monitor
Set my_openfiles = my_monitor.OpenFiles
Set first_file = my_openfiles.Item(1)
Set my_handles = first_file.FileHandles
Set first_handle = my_handles.Item(1)
locked_state = first_handle.IsLocked
See Also
DtoMkdeClients Collection
A collection of MicroKernel Engine client objects.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a DtoMkdeClients collection.
Methods
None
Remarks
Use the Count property to find the number of members in the collection.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
 
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get MicroKernel Engine Clients from monitor
Dim my_mkdeclients as DtoMkdeClients
Set my_mkdeclients = my_monitor.MkdeClients
See Also
DtoMkdeClient Object
An object representing an active MicroKernel Engine client.
Properties
BtrvID
Returns Btrieve ID of a MicroKernel Engine client.
CacheAccesses
Returns number of cache accesses for a MicroKernel Engine client.
ClientPlatform
Returns client platform enumeration for a MicroKernel Engine client. See Client Platform for possible values.
ClientPlatformName
Returns a text version of ClientPlatform.
ClientSite
Returns client site for a MicroKernel Engine client.
ConnectionNumber
Returns connection number for a MicroKernel Engine client.
CurrentLocks
Returns current number of locks for a MicroKernel client.
DiskAccesses
Returns number of disk accesses for a MicroKernel Engine client.
NetAddress
Returns address of a MicroKernel Engine client.
NumCursors
Returns number of cursors for a MicroKernel Engine client.
RecordsDeleted
Returns number of deleted records for a MicroKernel Engine client.
RecordsInserted
Returns number of inserted records for a MicroKernel Engine client.
RecordsRead
Returns number of read records for a MicroKernel Engine client.
RecordsUpdated
Returns number of updated records for a MicroKernel Engine client.
ServiceAgentID
Returns service agent identification of a MicroKernel Engine client
TaskNumber
Returns task number of a MicroKernel Engine client.
TransLevel
Returns transaction level of a MicroKernel Engine client.
TransState
Returns transaction state enumeration. See Transaction State for possible values.
UserName
Returns MicroKernel Engine client user name.
Collections
Methods
Remarks
To obtain all the MicroKernel Engine clients, use the DtoMkdeClients Collection.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
' Get monitor object from session
Dim my_monitor as DtoMonitor
my_monitor = my_session.Monitor
 
' Now get MicroKernel Engine Clients from monitor
Dim my_mkdeclients as DtoMkdeClients
Set my_mkdeclients = my_monitor.MkdeClients
 
' retrieve first client and query a property
Dim first_client as DtoMkdeClient
Dim num_locks as long
Set first_client = my_mkdeclients.Item(1)
num_locks = first_client.CurrentLocks
See Also
Methods Detail
Disconnect method
Disconnects a specific MicroKernel Engine client.
Syntax
result = Object.Disconnect
Arguments
In
Object
DtoMkdeClient object
Return Values
result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
Remarks
Call this method for every MicroKernel Engine client that you wish to disconnect.
Example
Dim result as DtoResult
result = my_mkdeclient.Disconnect
DtoMkdeClientHandles Collection
A collection of DtoMkdeClientHandle objects.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a DtoMkdeClientHandles collection.
Methods
None
Remarks
Use the Count property to find the number of members in the collection.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get MicroKernel Engine Clients from monitor
Dim my_mkdeclients as DtoMkdeClients
Set my_mkdeclients = my_monitor.MkdeClients
 
' retrieve first client and get its client handles
Dim first_client as DtoMkdeClient
Dim my_clienthandles as DtoMkdeClientHandles
Set first_client = my_mkdeclients(1)
' to get all handles, use ClientHandles collection
Set my_clienthandles = first_client.ClientHandles
 
' determine number of members in the collection
Dim num_clienthandles as Long
num_clienthandles = my_clienthandles.Count
See Also
DtoMkdeClientHandle Object
An object representing a MicroKernel client handle.
Properties
FileName
Returns file name associated with a MicroKernel client handle
LockType
Returns locks status enumeration of a MicroKernel client handle. See Lock Type for possible values.
OpenMode
Returns open mode enumeration of the MicroKernel client handle. See Open Mode for possible values.
OpenModeName
Returns a text version of OpenMode.
TransState
Returns transaction state.
WaitState
Returns wait status enumeration for a MicroKernel client handle. See Wait State for possible values.
Methods
None
Remarks
To obtain all the MicroKernel client handles for a specific client, use the DtoMkdeClientHandles Collection.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get MicroKernel Engine Clients from monitor
Dim my_mkdeclients as DtoMkdeClients
Set my_mkdeclients = my_monitor.MkdeClients
 
' retrieve first client and get its client handles
Dim first_client as DtoMkdeClient
Dim my_clienthandles as DtoMkdeClientHandles
Set first_client = my_mkdeclients(1)
Set my_clienthandles = first_client.MkdeClientHandles
 
' determine number of members in the collection
Dim num_clienthandles as long
num_clienthandles = my_clienthandles.Count
 
' get first client handle and query file name
Dim first_clienthandle as DtoMkdeClientHandle
Dim fileName as string
Set first_clienthandle = my_clienthandles(1)
fileName = first_clienthandle.FileName
See Also
DtoCommStat Object
An object that represents usage information for a server.
Properties
CurActiveThreads
Returns current number of active threads for a session.
CurQueuedRequests
Returns number of queued requests for a session.
CurRemoteSessions
Returns number of queued requests for a session or protocol.
MaxActiveThreads
Returns maximum number of active threads for a session.
MaxQueuedRequests
Returns maximum number of queued requests for a session.
MaxRemoteSessions
Returns maximum number of remote sessions for a session.
PeakActiveThreads
Returns highest number of active threads for a session
PeakQueuedRequests
Returns highest number of queued requests for a session.
PeakRemoteSessions
Returns highest number of remote sessions for a session
RequestsProcessed
Returns total number of requests processed for a session
TotalTimeOuts
DTO2 only: Returns total number of communication time outs.
TotalRecoveries
DTO2 only: Returns total number of reconnects using the Zen auto reconnect feature. See Advanced Operations Guide for more information.
Collections
Objects
Methods
None
Remarks
All the properties for this object return values of type Long integer.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Get comm stat object
Dim my_commstat as DtoCommStat
Set my_commstat = my_monitor.MkdeCommStat
 
' Get total number of requests processed
Dim requests as long
requests = my_commstat.RequestsProcessed
See Also
DtoProtocolStats Collection
A collection of DtoProtocolStat objects.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a collection.
Methods
None
Remarks
Use the Count property to find the number of members in the collection.
Example
' Instantiate Session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get Monitor object from Session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Get Comm stat object from Monitor
Dim my_commstat as DtoCommStat
Set my_commstat = my_monitor.MkdeCommStat
 
' Now get Protocol stats collection from Comm stat
Dim my_protocols as DtoProtocolStats
Set my_protocols = my_commstat.ProtocolStats
See Also
DtoProtocolStat Object
Provides information about a communications protocol.
Properties
CurRemoteSessions
Returns number of queued requests for a session or protocol.
PeakRemoteSessions
Returns highest number of remote sessions for a session or protocol.
ProtocolID
Returns ID of a protocol. Only the following return code is currently supported: 4 – WINSOCK TPC/IP
RequestsProcessed
Returns total number of requests processed for a session or protocol.
Methods
None
Remarks
To access a particular protocol using this object, you must first obtain a DtoProtocolStats Collection using the DtoMonitor Object and the DtoCommStat Object
All the properties for this object return values of type Long integer.
Examples
To obtain the number of requests processed using this protocol:
num_requests = Object.RequestsProcessed
To obtain the current number of remote sessions:
RemoteSess_count = Object.CurRemoteSessions
See Also
DtoSqlClients Collection
A collection of DtoSqlClient objects, representing all the SQL clients on a server.
Properties
Count
Returns number of members in a collection.
Item
Returns a specific member of a collection.
Methods
None
Remarks
Note:  This collection cannot be obtained by a Workstation engine.
Use the Count property to find the number of members in the collection.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get SQL Clients from monitor
Dim my_sqlclients as DtoSqlClients
Set my_sqlclients = my_monitor.SqlClients
See Also
DtoSqlClient Object
Allows you to query information about and disconnect a SQL client.
Properties
AppDesc
Returns a description of the application that created a SQL client.
ConnectTime
Returns connection time for the SQL client.
CurStatusTime
Returns time since the last status.
DSN
Returns DSN associated with a SQL Client.
HostName
Returns host name for a SQL client.
IP
Returns IP for a SQL Client.
ProcessID
Returns process ID for a SQL client.
Status
Returns status of a SQL client.
ThreadId
Returns thread identification of a SQL client
UserName
Returns user name associated with the SQL client.
Methods
Remarks
Use the DtoSqlClients Collection to obtain all the current SQL clients.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor object from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get SQL Clients from monitor
Dim my_sqlclients as DtoSqlClients
Set my_sqlclients = my_monitor.SqlClients
 
' Pick first client from collection and find
' the DSN associated with it
Dim first_sqlclient as DtoSqlClient
Dim DSNname as string
Set first_sqlclient = my_sqlclients(1)
DSNname = first_sqlclient.DSN
See Also
Methods Detail
Disconnect method
Disconnects a specific SQL Client.
Syntax
result = Object.Disconnect
Arguments
Object
DtoSqlClient object
Return Values
result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
Remarks
Call this method for every SQL client you wish to disconnect.
Example
result = my_sqlclient.Disconnect
DtoMkdeVersion Object
DTO2 only: An object representing the version of the MicroKernel Engine.
Properties
MajorVersion
Returns major version of the engine.
MinorVersion
Returns minor version of the engine.
BuildNumber
Build number of the MicroKernel Engine release
OSTarget
Target operating system returns NTSV for Windows and UXSV for Unix systems.
Methods
None
Remarks
You can obtain a DtoMkdeVersion object through the properties of the DtoMonitor Object.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get monitor from session
Dim my_monitor as DtoMonitor
Set my_monitor = my_session.Monitor
 
' Now get the MkdeVersion object from monitor
Dim my_mkdeversion as DtoMkdeVersion
MajorVer = my_mkdeversion.MajorVersion
See Also
DtoEngineInformation Object
DTO2 only: An object representing information about the database engine.
Properties
MajorVersion
Returns major version of the engine.
MinorVersion
Returns minor version of the engine.
dbuApiVersion
Version of the DTI/DTO interface
IsServerEngine
Returns true if target is a server engine (as opposed to a workgroup engine)
ServerClientType
Returns one of the following:
0 = UNKNOWN_ENGINE_CLIENT
1 = NT_SERVER
3 = WIN32_CLIENT
4 = UNIX_SERVER
5 = CACHE_ENGINE_CLIENT
6 = VXWIN_SERVER
7 = VXLINUX_SERVER
9 = REPORT_ENGINE
Methods
None
Remarks
You can obtain a DtoEngineInformation object through the properties of the DtoSession Object.
Example
' Instantiate session and connect
Dim my_session as new DtoSession
Dim result as DtoResult
result = my_session.Connect("myserver", "username", "password")
 
' Get engine information from session
Dim my_engineInfo as DtoEngineInformation
Set my_engineInfo = my_session.EngineInformation
 
' Now get the client type from the engine info object
clientType = my_engineInfo.ServerClientType
See Also
Last modified date: 10/31/2023