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.

221 lines
7.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. infodata.h
  7. Extensible object definitions for the Internet Info Services Common
  8. counter objects & counters.
  9. FILE HISTORY:
  10. MuraliK 02-Jun-1995 Added Counters for Atq I/O requests
  11. SophiaC 16-Oct-1995 Info/Access Product Split
  12. */
  13. #ifndef _INFODATA_H_
  14. #define _INFODATA_H_
  15. #define INFO_PERFORMANCE_KEY INET_INFO_KEY "\\Performance"
  16. //
  17. // This structure is used to ensure the first counter is properly
  18. // aligned. Unfortunately, since PERF_COUNTER_BLOCK consists
  19. // of just a single DWORD, any LARGE_INTEGERs that immediately
  20. // follow will not be aligned properly.
  21. //
  22. // This structure requires "natural" packing & alignment (probably
  23. // quad-word, especially on Alpha). Ergo, keep it out of the
  24. // #pragma pack(4) scope below.
  25. //
  26. typedef struct _INFO_COUNTER_BLOCK
  27. {
  28. PERF_COUNTER_BLOCK PerfCounterBlock;
  29. LARGE_INTEGER DummyEntryForAlignmentPurposesOnly;
  30. } INFO_COUNTER_BLOCK;
  31. //
  32. // The routines that load these structures assume that all fields
  33. // are DWORD packed & aligned.
  34. //
  35. #pragma pack(4)
  36. //
  37. // Offsets within a PERF_COUNTER_BLOCK.
  38. //
  39. #define INFO_ATQ_TOTAL_ALLOWED_REQUESTS_OFFSET (sizeof(INFO_COUNTER_BLOCK))
  40. #define INFO_ATQ_TOTAL_BLOCKED_REQUESTS_OFFSET \
  41. (INFO_ATQ_TOTAL_ALLOWED_REQUESTS_OFFSET + \
  42. sizeof(DWORD))
  43. #define INFO_ATQ_TOTAL_REJECTED_REQUESTS_OFFSET \
  44. (INFO_ATQ_TOTAL_BLOCKED_REQUESTS_OFFSET + \
  45. sizeof(DWORD))
  46. #define INFO_ATQ_CURRENT_BLOCKED_REQUESTS_OFFSET \
  47. (INFO_ATQ_TOTAL_REJECTED_REQUESTS_OFFSET + sizeof(DWORD))
  48. #define INFO_ATQ_MEASURED_BANDWIDTH_OFFSET \
  49. (INFO_ATQ_CURRENT_BLOCKED_REQUESTS_OFFSET + sizeof(DWORD))
  50. #define INFO_CACHE_FILES_CACHED_OFFSET \
  51. (INFO_ATQ_MEASURED_BANDWIDTH_OFFSET + sizeof(DWORD))
  52. #define INFO_CACHE_TOTAL_FILES_CACHED_OFFSET \
  53. (INFO_CACHE_FILES_CACHED_OFFSET + sizeof(DWORD))
  54. #define INFO_CACHE_FILES_HIT_OFFSET \
  55. (INFO_CACHE_TOTAL_FILES_CACHED_OFFSET + sizeof(DWORD))
  56. #define INFO_CACHE_FILES_MISS_OFFSET \
  57. (INFO_CACHE_FILES_HIT_OFFSET + sizeof(DWORD))
  58. #define INFO_CACHE_FILE_RATIO_OFFSET \
  59. (INFO_CACHE_FILES_MISS_OFFSET + sizeof(DWORD))
  60. #define INFO_CACHE_FILE_RATIO_DENOM_OFFSET \
  61. (INFO_CACHE_FILE_RATIO_OFFSET + sizeof(DWORD))
  62. #define INFO_CACHE_FILE_FLUSHES_OFFSET \
  63. (INFO_CACHE_FILE_RATIO_DENOM_OFFSET + sizeof(DWORD))
  64. #define INFO_CACHE_CURRENT_FILE_CACHE_SIZE_OFFSET \
  65. (INFO_CACHE_FILE_FLUSHES_OFFSET + sizeof(DWORD))
  66. #define INFO_CACHE_MAXIMUM_FILE_CACHE_SIZE_OFFSET \
  67. (INFO_CACHE_CURRENT_FILE_CACHE_SIZE_OFFSET + sizeof(DWORD))
  68. #define INFO_CACHE_ACTIVE_FLUSHED_FILES_OFFSET \
  69. (INFO_CACHE_MAXIMUM_FILE_CACHE_SIZE_OFFSET + sizeof(DWORD))
  70. #define INFO_CACHE_TOTAL_FLUSHED_FILES_OFFSET \
  71. (INFO_CACHE_ACTIVE_FLUSHED_FILES_OFFSET + sizeof(DWORD))
  72. #define INFO_CACHE_URI_CACHED_OFFSET \
  73. (INFO_CACHE_TOTAL_FLUSHED_FILES_OFFSET + sizeof(DWORD))
  74. #define INFO_CACHE_TOTAL_URI_CACHED_OFFSET \
  75. (INFO_CACHE_URI_CACHED_OFFSET + sizeof(DWORD))
  76. #define INFO_CACHE_URI_HIT_OFFSET \
  77. (INFO_CACHE_TOTAL_URI_CACHED_OFFSET + sizeof(DWORD))
  78. #define INFO_CACHE_URI_MISS_OFFSET \
  79. (INFO_CACHE_URI_HIT_OFFSET + sizeof(DWORD))
  80. #define INFO_CACHE_URI_RATIO_OFFSET \
  81. (INFO_CACHE_URI_MISS_OFFSET + sizeof(DWORD))
  82. #define INFO_CACHE_URI_RATIO_DENOM_OFFSET \
  83. (INFO_CACHE_URI_RATIO_OFFSET + sizeof(DWORD))
  84. #define INFO_CACHE_URI_FLUSHES_OFFSET \
  85. (INFO_CACHE_URI_RATIO_DENOM_OFFSET + sizeof(DWORD))
  86. #define INFO_CACHE_TOTAL_FLUSHED_URI_OFFSET \
  87. (INFO_CACHE_URI_FLUSHES_OFFSET + sizeof(DWORD))
  88. #define INFO_CACHE_BLOB_CACHED_OFFSET \
  89. (INFO_CACHE_TOTAL_FLUSHED_URI_OFFSET + sizeof(DWORD))
  90. #define INFO_CACHE_TOTAL_BLOB_CACHED_OFFSET \
  91. (INFO_CACHE_BLOB_CACHED_OFFSET + sizeof(DWORD))
  92. #define INFO_CACHE_BLOB_HIT_OFFSET \
  93. (INFO_CACHE_TOTAL_BLOB_CACHED_OFFSET + sizeof(DWORD))
  94. #define INFO_CACHE_BLOB_MISS_OFFSET \
  95. (INFO_CACHE_BLOB_HIT_OFFSET + sizeof(DWORD))
  96. #define INFO_CACHE_BLOB_RATIO_OFFSET \
  97. (INFO_CACHE_BLOB_MISS_OFFSET + sizeof(DWORD))
  98. #define INFO_CACHE_BLOB_RATIO_DENOM_OFFSET \
  99. (INFO_CACHE_BLOB_RATIO_OFFSET + sizeof(DWORD))
  100. #define INFO_CACHE_BLOB_FLUSHES_OFFSET \
  101. (INFO_CACHE_BLOB_RATIO_DENOM_OFFSET + sizeof(DWORD))
  102. #define INFO_CACHE_TOTAL_FLUSHED_BLOB_OFFSET \
  103. (INFO_CACHE_BLOB_FLUSHES_OFFSET + sizeof(DWORD))
  104. #define SIZE_OF_INFO_PERFORMANCE_DATA \
  105. (INFO_CACHE_TOTAL_FLUSHED_BLOB_OFFSET + sizeof(DWORD))
  106. //
  107. // The counter structure returned.
  108. //
  109. typedef struct _INFO_DATA_DEFINITION
  110. {
  111. PERF_OBJECT_TYPE INFOObjectType;
  112. PERF_COUNTER_DEFINITION INFOTotalAllowedRequests;
  113. PERF_COUNTER_DEFINITION INFOTotalBlockedRequests;
  114. PERF_COUNTER_DEFINITION INFOTotalRejectedRequests;
  115. PERF_COUNTER_DEFINITION INFOCurrentRejectedRequests;
  116. PERF_COUNTER_DEFINITION INFOMeasuredBandwidth;
  117. PERF_COUNTER_DEFINITION INFOFilesCached;
  118. PERF_COUNTER_DEFINITION INFOTotalFilesCached;
  119. PERF_COUNTER_DEFINITION INFOFileHits;
  120. PERF_COUNTER_DEFINITION INFOFileMisses;
  121. PERF_COUNTER_DEFINITION INFOFileHitsRatio;
  122. PERF_COUNTER_DEFINITION INFOFileHitsRatioDenom;
  123. PERF_COUNTER_DEFINITION INFOFileFlushes;
  124. PERF_COUNTER_DEFINITION INFOFileCurrentCacheSize;
  125. PERF_COUNTER_DEFINITION INFOFileMaximumCacheSize;
  126. PERF_COUNTER_DEFINITION INFOFileFlushedEntries;
  127. PERF_COUNTER_DEFINITION INFOFileTotalFlushed;
  128. PERF_COUNTER_DEFINITION INFOURICached;
  129. PERF_COUNTER_DEFINITION INFOTotalURICached;
  130. PERF_COUNTER_DEFINITION INFOURIHits;
  131. PERF_COUNTER_DEFINITION INFOURIMisses;
  132. PERF_COUNTER_DEFINITION INFOURIHitsRatio;
  133. PERF_COUNTER_DEFINITION INFOURIHitsRatioDenom;
  134. PERF_COUNTER_DEFINITION INFOURIFlushes;
  135. PERF_COUNTER_DEFINITION INFOURITotalFlushed;
  136. PERF_COUNTER_DEFINITION INFOBlobCached;
  137. PERF_COUNTER_DEFINITION INFOTotalBlobCached;
  138. PERF_COUNTER_DEFINITION INFOBlobHits;
  139. PERF_COUNTER_DEFINITION INFOBlobMisses;
  140. PERF_COUNTER_DEFINITION INFOBlobHitsRatio;
  141. PERF_COUNTER_DEFINITION INFOBlobHitsRatioDenom;
  142. PERF_COUNTER_DEFINITION INFOBlobFlushes;
  143. PERF_COUNTER_DEFINITION INFOBlobTotalFlushed;
  144. } INFO_DATA_DEFINITION;
  145. extern INFO_DATA_DEFINITION INFODataDefinition;
  146. #define NUMBER_OF_INFO_COUNTERS ((sizeof(INFO_DATA_DEFINITION) - \
  147. sizeof(PERF_OBJECT_TYPE)) / \
  148. sizeof(PERF_COUNTER_DEFINITION))
  149. //
  150. // Restore default packing & alignment.
  151. //
  152. #pragma pack()
  153. #endif // _INFODATA_H_
  154.