Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
6.6 KiB

  1. //
  2. // MODULE: NWPerf.H
  3. //
  4. // This file contains all the defines and prototypes for the performnce
  5. // monitoring DLL for NetWare redirector
  6. //
  7. // Date: Sept, 28 1993
  8. //
  9. // The routines that load these structures assume that all fields
  10. // are packed and aligned on DWORD boundries. Alpha support may
  11. // change this assumption so the pack pragma is used here to insure
  12. // the DWORD packing assumption remains valid.
  13. //
  14. #pragma pack (4)
  15. //
  16. // All these definitions will have to be updated when new counters are added.
  17. // if a new counter called COUNTX is added then the Help and Title indicies
  18. // defines should include a new entry - "#define COUNTXOBJ 4". This increases
  19. // in increments of 2 because each counter has a title and help index.
  20. //
  21. // The Offset of the counters should have another entry - with the size of
  22. // the data for COUNT -
  23. // "#define COUNTER_OFFSET_COUNTX COUNTER_OFFSET_USERS+sizeof(COUNTX_TYPE)"
  24. //
  25. // The SIZE_OF_COUNTER_BLOCK will be updated to:
  26. // "#define SIZE_OF_COUNTER_BLOCK COUNTER_OFFSET_COUNTX + sizeof(DWORD)"
  27. //
  28. // Finally the NW_DATA_DEFINITION will have a new PERF_COUNTER_DEFINTIION
  29. // entry
  30. // Title and Help index defines. These are used for looking up the Registry
  31. // to get at the counter indicies for the title and help strings.
  32. #define NW_NUM_OBJECTS 1
  33. #define NWOBJ 0
  34. #define PACKET_BURST_READ_ID 2
  35. #define PACKET_BURST_READ_TO_ID 4
  36. #define PACKET_BURST_WRITE_ID 6
  37. #define PACKET_BURST_WRITE_TO_ID 8
  38. #define PACKET_BURST_IO_ID 10
  39. #define CONNECT_2X_ID 12
  40. #define CONNECT_3X_ID 14
  41. #define CONNECT_4X_ID 16
  42. //
  43. // NetWare Redirector data object definitions.
  44. // The offsets of the counters. The first DWORD is the size of the counter
  45. // data block. In WinPerf, you will see this as PERF_COUNTER_BLOCK.ByteLength
  46. //
  47. #define BYTES_OFFSET sizeof(DWORD)
  48. #define IO_OPERATIONS_OFFSET BYTES_OFFSET + sizeof(LARGE_INTEGER)
  49. #define PACKETS_OFFSET IO_OPERATIONS_OFFSET + sizeof(DWORD)
  50. #define BYTES_RECEIVED_OFFSET PACKETS_OFFSET + \
  51. sizeof(LARGE_INTEGER)
  52. #define NCPS_RECEIVED_OFFSET BYTES_RECEIVED_OFFSET + \
  53. sizeof(LARGE_INTEGER)
  54. #define BYTES_TRANSMITTED_OFFSET \
  55. NCPS_RECEIVED_OFFSET + \
  56. sizeof(LARGE_INTEGER)
  57. #define NCPS_TRANSMITTED_OFFSET \
  58. BYTES_TRANSMITTED_OFFSET + \
  59. sizeof(LARGE_INTEGER)
  60. #define RDR_READ_OPERATIONS_OFFSET \
  61. NCPS_TRANSMITTED_OFFSET + \
  62. sizeof(LARGE_INTEGER)
  63. #define RANDOM_READ_OPERATIONS_OFFSET RDR_READ_OPERATIONS_OFFSET + \
  64. sizeof(DWORD)
  65. #define READ_NCPS_OFFSET RANDOM_READ_OPERATIONS_OFFSET + \
  66. sizeof(DWORD)
  67. #define RDR_WRITE_OPERATIONS_OFFSET READ_NCPS_OFFSET + \
  68. sizeof(DWORD)
  69. #define RANDOM_WRITE_OPERATIONS_OFFSET RDR_WRITE_OPERATIONS_OFFSET + \
  70. sizeof(DWORD)
  71. #define WRITE_NCPS_OFFSET RANDOM_WRITE_OPERATIONS_OFFSET + \
  72. sizeof(DWORD)
  73. #define SESSIONS_OFFSET WRITE_NCPS_OFFSET + \
  74. sizeof(DWORD)
  75. #define RECONNECTS_OFFSET SESSIONS_OFFSET + \
  76. sizeof(DWORD)
  77. #define NETWARE_2X_CONNECTS_OFFSET RECONNECTS_OFFSET + \
  78. sizeof(DWORD)
  79. #define NETWARE_3X_CONNECTS_OFFSET NETWARE_2X_CONNECTS_OFFSET + \
  80. sizeof(DWORD)
  81. #define NETWARE_4X_CONNECTS_OFFSET NETWARE_3X_CONNECTS_OFFSET + \
  82. sizeof(DWORD)
  83. #define SERVER_DISCONNECTS_OFFSET NETWARE_4X_CONNECTS_OFFSET + \
  84. sizeof(DWORD)
  85. #define PACKET_BURST_READ_OFFSET SERVER_DISCONNECTS_OFFSET + \
  86. sizeof(DWORD)
  87. #define PACKET_BURST_READ_TO_OFFSET PACKET_BURST_READ_OFFSET + \
  88. sizeof(DWORD)
  89. #define PACKET_BURST_WRITE_OFFSET PACKET_BURST_READ_TO_OFFSET + \
  90. sizeof(DWORD)
  91. #define PACKET_BURST_WRITE_TO_OFFSET PACKET_BURST_WRITE_OFFSET + \
  92. sizeof(DWORD)
  93. #define PACKET_BURST_IO_OFFSET PACKET_BURST_WRITE_TO_OFFSET + \
  94. sizeof(DWORD)
  95. #define EIGHT_BYTE_PAD_OFFSET PACKET_BURST_IO_OFFSET + \
  96. sizeof(DWORD)
  97. #define SIZE_OF_COUNTER_BLOCK EIGHT_BYTE_PAD_OFFSET + \
  98. sizeof(DWORD)
  99. // The definition of the NetWare Data definition. This structure holds the
  100. // definition for actual NetWare object and the definition for each of the
  101. // counters.
  102. typedef struct _NW_DATA_DEFINITION {
  103. PERF_OBJECT_TYPE NWObjectType;
  104. PERF_COUNTER_DEFINITION Bytes;
  105. PERF_COUNTER_DEFINITION IoOperations;
  106. PERF_COUNTER_DEFINITION Ncps;
  107. PERF_COUNTER_DEFINITION BytesReceived;
  108. PERF_COUNTER_DEFINITION NcpsReceived;
  109. PERF_COUNTER_DEFINITION BytesTransmitted;
  110. PERF_COUNTER_DEFINITION NcpsTransmitted;
  111. PERF_COUNTER_DEFINITION ReadOperations;
  112. PERF_COUNTER_DEFINITION RandomReadOperations;
  113. PERF_COUNTER_DEFINITION ReadNcps;
  114. PERF_COUNTER_DEFINITION WriteOperations;
  115. PERF_COUNTER_DEFINITION RandomWriteOperations;
  116. PERF_COUNTER_DEFINITION WriteNcps;
  117. PERF_COUNTER_DEFINITION Sessions;
  118. PERF_COUNTER_DEFINITION Reconnects;
  119. PERF_COUNTER_DEFINITION NetWare2XConnects;
  120. PERF_COUNTER_DEFINITION NetWare3XConnects;
  121. PERF_COUNTER_DEFINITION NetWare4XConnects;
  122. PERF_COUNTER_DEFINITION ServerDisconnects;
  123. PERF_COUNTER_DEFINITION PacketBurstRead;
  124. PERF_COUNTER_DEFINITION PacketBurstReadTimeouts;
  125. PERF_COUNTER_DEFINITION PacketBurstWrite;
  126. PERF_COUNTER_DEFINITION PacketBurstWriteTimeouts;
  127. PERF_COUNTER_DEFINITION PacketBurstIO;
  128. } NW_DATA_DEFINITION;
  129. #pragma pack ()
  130. PM_OPEN_PROC OpenNetWarePerformanceData;
  131. PM_COLLECT_PROC CollectNetWarePerformanceData;
  132. PM_CLOSE_PROC CloseNetWarePerformanceData;