Klasse PdhUtil

java.lang.Object
com.sun.jna.platform.win32.PdhUtil

public abstract class PdhUtil extends Object
Pdh utility API.
Autor:
widdis[at]gmail[dot]com
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static class 
    Holder Object for PdhEnumObjectsItems.
    static final class 
     
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    PdhEnumObjectItems(String szDataSource, String szMachineName, 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
    Utility method similar to Pdh's PdhLookupPerfIndexByName that returns the counter index corresponding to the specified counter name in English.
    static String
    PdhLookupPerfNameByIndex(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.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • PdhUtil

      public PdhUtil()
  • Methodendetails

    • PdhLookupPerfNameByIndex

      public static String PdhLookupPerfNameByIndex(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.
      Parameter:
      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.
      Gibt zurück:
      Returns the name of the performance object or counter.
    • PdhLookupPerfIndexByEnglishName

      public static int PdhLookupPerfIndexByEnglishName(String szNameBuffer)
      Utility method similar to Pdh's PdhLookupPerfIndexByName that returns the counter index corresponding to the specified counter name in English. Uses the registry on the local machine to find the index in the English locale, regardless of the current language setting on the machine.
      Parameter:
      szNameBuffer - The English name of the performance counter
      Gibt zurück:
      The counter's index if it exists, or 0 otherwise.
    • PdhEnumObjectItems

      public static PdhUtil.PdhEnumObjectItems PdhEnumObjectItems(String szDataSource, String szMachineName, 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.
      Parameter:
      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.
      Gibt zurück:
      Returns a List of Strings of the counters for the object.