public abstract class PdhUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PdhUtil.PdhEnumObjectItems
Holder Object for PdhEnumObjectsItems.
|
static class |
PdhUtil.PdhException |
Constructor and Description |
---|
PdhUtil() |
Modifier and Type | Method and Description |
---|---|
static PdhUtil.PdhEnumObjectItems |
PdhEnumObjectItems(java.lang.String szDataSource,
java.lang.String szMachineName,
java.lang.String szObjectName,
int dwDetailLevel)
Utility method to call Pdh's PdhEnumObjectItems that allocates the
required memory for the lists parameters based on the type mapping used,
calls to PdhEnumObjectItems, and returns the received lists of strings.
|
static int |
PdhLookupPerfIndexByEnglishName(java.lang.String szNameBuffer)
Utility method similar to Pdh's PdhLookupPerfIndexByName that returns the
counter index corresponding to the specified counter name in English.
|
static java.lang.String |
PdhLookupPerfNameByIndex(java.lang.String szMachineName,
int dwNameIndex)
Utility method to call Pdh's PdhLookupPerfNameByIndex that allocates the
required memory for the szNameBuffer parameter based on the type mapping
used, calls to PdhLookupPerfNameByIndex, and returns the received string.
|
public static java.lang.String PdhLookupPerfNameByIndex(java.lang.String szMachineName, int dwNameIndex)
szMachineName
- Null-terminated string that specifies the name of the computer
where the specified performance object or counter is located.
The computer name can be specified by the DNS name or the IP
address. If NULL, the function uses the local computer.dwNameIndex
- Index of the performance object or counter.public static int PdhLookupPerfIndexByEnglishName(java.lang.String szNameBuffer)
szNameBuffer
- The English name of the performance counterpublic static PdhUtil.PdhEnumObjectItems PdhEnumObjectItems(java.lang.String szDataSource, java.lang.String szMachineName, java.lang.String szObjectName, int dwDetailLevel)
szDataSource
- String that specifies the name of the log file used to
enumerate the counter and instance names. If NULL, the
function uses the computer specified in the szMachineName
parameter to enumerate the names.szMachineName
- String that specifies the name of the computer that contains
the counter and instance names that you want to enumerate.
Include the leading slashes in the computer name, for example,
\\computername. If the szDataSource parameter is NULL, you can
set szMachineName to NULL to specify the local computer.szObjectName
- String that specifies the name of the object whose counter and
instance names you want to enumerate.dwDetailLevel
- Detail level of the performance items to return. All items
that are of the specified detail level or less will be
returned.