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.

479 lines
12 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. infodata.c
  7. Constant data structures for the Info Server's counter objects &
  8. counters.
  9. FILE HISTORY:
  10. KeithMo 07-Jun-1993 Created.
  11. MuraliK 02-Jun-1995 Added Counters for Atq I/O requests
  12. SophiaC 16-Oct-1995 Info/Access Product Split
  13. */
  14. #include <windows.h>
  15. #include <winperf.h>
  16. #include <infoctrs.h>
  17. #include <infodata.h>
  18. //
  19. // Initialize the constant portitions of these data structure.
  20. // Certain parts (especially the name/help indices) will be
  21. // updated at initialization time.
  22. //
  23. INFO_DATA_DEFINITION INFODataDefinition =
  24. {
  25. { // INFOObjectType
  26. sizeof(INFO_DATA_DEFINITION) + SIZE_OF_INFO_PERFORMANCE_DATA,
  27. sizeof(INFO_DATA_DEFINITION),
  28. sizeof(PERF_OBJECT_TYPE),
  29. INFO_COUNTER_OBJECT,
  30. 0,
  31. INFO_COUNTER_OBJECT,
  32. 0,
  33. PERF_DETAIL_ADVANCED,
  34. NUMBER_OF_INFO_COUNTERS,
  35. 2, // Default = Bytes Total/sec
  36. PERF_NO_INSTANCES,
  37. 0,
  38. { 0, 0 },
  39. { 0, 0 }
  40. },
  41. { // TotalAllowedRequests
  42. sizeof(PERF_COUNTER_DEFINITION),
  43. INFO_ATQ_TOTAL_ALLOWED_REQUESTS_COUNTER,
  44. 0,
  45. INFO_ATQ_TOTAL_ALLOWED_REQUESTS_COUNTER,
  46. 0,
  47. -1,
  48. PERF_DETAIL_ADVANCED,
  49. PERF_COUNTER_RAWCOUNT,
  50. sizeof(DWORD),
  51. INFO_ATQ_TOTAL_ALLOWED_REQUESTS_OFFSET
  52. },
  53. { // TotalBlockedRequests
  54. sizeof(PERF_COUNTER_DEFINITION),
  55. INFO_ATQ_TOTAL_BLOCKED_REQUESTS_COUNTER,
  56. 0,
  57. INFO_ATQ_TOTAL_BLOCKED_REQUESTS_COUNTER,
  58. 0,
  59. -1,
  60. PERF_DETAIL_ADVANCED,
  61. PERF_COUNTER_RAWCOUNT,
  62. sizeof(DWORD),
  63. INFO_ATQ_TOTAL_BLOCKED_REQUESTS_OFFSET
  64. },
  65. { // TotalRejectedRequests
  66. sizeof(PERF_COUNTER_DEFINITION),
  67. INFO_ATQ_TOTAL_REJECTED_REQUESTS_COUNTER,
  68. 0,
  69. INFO_ATQ_TOTAL_REJECTED_REQUESTS_COUNTER,
  70. 0,
  71. -1,
  72. PERF_DETAIL_ADVANCED,
  73. PERF_COUNTER_RAWCOUNT,
  74. sizeof(DWORD),
  75. INFO_ATQ_TOTAL_REJECTED_REQUESTS_OFFSET
  76. },
  77. { // CurrentBlockedRequests
  78. sizeof(PERF_COUNTER_DEFINITION),
  79. INFO_ATQ_CURRENT_BLOCKED_REQUESTS_COUNTER,
  80. 0,
  81. INFO_ATQ_CURRENT_BLOCKED_REQUESTS_COUNTER,
  82. 0,
  83. -1,
  84. PERF_DETAIL_ADVANCED,
  85. PERF_COUNTER_RAWCOUNT,
  86. sizeof(DWORD),
  87. INFO_ATQ_CURRENT_BLOCKED_REQUESTS_OFFSET
  88. },
  89. { // AtqMeasuredBandwidth
  90. sizeof(PERF_COUNTER_DEFINITION),
  91. INFO_ATQ_MEASURED_BANDWIDTH_COUNTER,
  92. 0,
  93. INFO_ATQ_MEASURED_BANDWIDTH_COUNTER,
  94. 0,
  95. -1,
  96. PERF_DETAIL_ADVANCED,
  97. PERF_COUNTER_RAWCOUNT,
  98. sizeof(DWORD),
  99. INFO_ATQ_MEASURED_BANDWIDTH_OFFSET
  100. },
  101. { // FilesCached
  102. sizeof(PERF_COUNTER_DEFINITION),
  103. INFO_CACHE_FILES_CACHED_COUNTER,
  104. 0,
  105. INFO_CACHE_FILES_CACHED_COUNTER,
  106. 0,
  107. -1,
  108. PERF_DETAIL_ADVANCED,
  109. PERF_COUNTER_RAWCOUNT,
  110. sizeof(DWORD),
  111. INFO_CACHE_FILES_CACHED_OFFSET
  112. },
  113. { // TotalFilesCached
  114. sizeof(PERF_COUNTER_DEFINITION),
  115. INFO_CACHE_TOTAL_FILES_CACHED_COUNTER,
  116. 0,
  117. INFO_CACHE_TOTAL_FILES_CACHED_COUNTER,
  118. 0,
  119. -1,
  120. PERF_DETAIL_ADVANCED,
  121. PERF_COUNTER_RAWCOUNT,
  122. sizeof(DWORD),
  123. INFO_CACHE_TOTAL_FILES_CACHED_OFFSET
  124. },
  125. { // FileCacheHits
  126. sizeof(PERF_COUNTER_DEFINITION),
  127. INFO_CACHE_FILES_HIT_COUNTER,
  128. 0,
  129. INFO_CACHE_FILES_HIT_COUNTER,
  130. 0,
  131. -3,
  132. PERF_DETAIL_ADVANCED,
  133. PERF_COUNTER_RAWCOUNT,
  134. sizeof(DWORD),
  135. INFO_CACHE_FILES_HIT_OFFSET
  136. },
  137. { // FileCacheMisses
  138. sizeof(PERF_COUNTER_DEFINITION),
  139. INFO_CACHE_FILES_MISS_COUNTER,
  140. 0,
  141. INFO_CACHE_FILES_MISS_COUNTER,
  142. 0,
  143. -3,
  144. PERF_DETAIL_ADVANCED,
  145. PERF_COUNTER_RAWCOUNT,
  146. sizeof(DWORD),
  147. INFO_CACHE_FILES_MISS_OFFSET
  148. },
  149. { // Calculated ratio of hits to misses - Numerator (cache hits)
  150. sizeof(PERF_COUNTER_DEFINITION),
  151. INFO_CACHE_FILE_RATIO_COUNTER,
  152. 0,
  153. INFO_CACHE_FILE_RATIO_COUNTER,
  154. 0,
  155. 0,
  156. PERF_DETAIL_ADVANCED,
  157. PERF_RAW_FRACTION,
  158. sizeof(DWORD),
  159. INFO_CACHE_FILE_RATIO_OFFSET
  160. },
  161. { // Calculated ratio of hits to misses - Denominator, not displayed!
  162. sizeof(PERF_COUNTER_DEFINITION),
  163. INFO_CACHE_FILE_RATIO_COUNTER_DENOM,
  164. 0,
  165. INFO_CACHE_FILE_RATIO_COUNTER_DENOM,
  166. 0,
  167. 0,
  168. PERF_DETAIL_ADVANCED,
  169. PERF_RAW_BASE,
  170. sizeof(DWORD),
  171. INFO_CACHE_FILE_RATIO_DENOM_OFFSET
  172. },
  173. { // File Cache Flushes
  174. sizeof(PERF_COUNTER_DEFINITION),
  175. INFO_CACHE_FILE_FLUSHES_COUNTER,
  176. 0,
  177. INFO_CACHE_FILE_FLUSHES_COUNTER,
  178. 0,
  179. -1,
  180. PERF_DETAIL_ADVANCED,
  181. PERF_COUNTER_RAWCOUNT,
  182. sizeof(DWORD),
  183. INFO_CACHE_FILE_FLUSHES_OFFSET
  184. },
  185. { // Current file cache size
  186. sizeof(PERF_COUNTER_DEFINITION),
  187. INFO_CACHE_CURRENT_FILE_CACHE_SIZE_COUNTER,
  188. 0,
  189. INFO_CACHE_CURRENT_FILE_CACHE_SIZE_COUNTER,
  190. 0,
  191. -1,
  192. PERF_DETAIL_ADVANCED,
  193. PERF_COUNTER_RAWCOUNT,
  194. sizeof(DWORD),
  195. INFO_CACHE_CURRENT_FILE_CACHE_SIZE_OFFSET
  196. },
  197. { // Maximum file cache size
  198. sizeof(PERF_COUNTER_DEFINITION),
  199. INFO_CACHE_MAXIMUM_FILE_CACHE_SIZE_COUNTER,
  200. 0,
  201. INFO_CACHE_MAXIMUM_FILE_CACHE_SIZE_COUNTER,
  202. 0,
  203. -1,
  204. PERF_DETAIL_ADVANCED,
  205. PERF_COUNTER_RAWCOUNT,
  206. sizeof(DWORD),
  207. INFO_CACHE_MAXIMUM_FILE_CACHE_SIZE_OFFSET
  208. },
  209. { // ActiveFlushedFiles
  210. sizeof(PERF_COUNTER_DEFINITION),
  211. INFO_CACHE_ACTIVE_FLUSHED_FILES_COUNTER,
  212. 0,
  213. INFO_CACHE_ACTIVE_FLUSHED_FILES_COUNTER,
  214. 0,
  215. 0,
  216. PERF_DETAIL_ADVANCED,
  217. PERF_COUNTER_RAWCOUNT,
  218. sizeof(DWORD),
  219. INFO_CACHE_ACTIVE_FLUSHED_FILES_OFFSET
  220. },
  221. { // Total flushed files
  222. sizeof(PERF_COUNTER_DEFINITION),
  223. INFO_CACHE_TOTAL_FLUSHED_FILES_COUNTER,
  224. 0,
  225. INFO_CACHE_TOTAL_FLUSHED_FILES_COUNTER,
  226. 0,
  227. -1,
  228. PERF_DETAIL_ADVANCED,
  229. PERF_COUNTER_RAWCOUNT,
  230. sizeof(DWORD),
  231. INFO_CACHE_TOTAL_FLUSHED_FILES_OFFSET
  232. },
  233. { // URICached
  234. sizeof(PERF_COUNTER_DEFINITION),
  235. INFO_CACHE_URI_CACHED_COUNTER,
  236. 0,
  237. INFO_CACHE_URI_CACHED_COUNTER,
  238. 0,
  239. -1,
  240. PERF_DETAIL_ADVANCED,
  241. PERF_COUNTER_RAWCOUNT,
  242. sizeof(DWORD),
  243. INFO_CACHE_URI_CACHED_OFFSET
  244. },
  245. { // TotalURICached
  246. sizeof(PERF_COUNTER_DEFINITION),
  247. INFO_CACHE_TOTAL_URI_CACHED_COUNTER,
  248. 0,
  249. INFO_CACHE_TOTAL_URI_CACHED_COUNTER,
  250. 0,
  251. -1,
  252. PERF_DETAIL_ADVANCED,
  253. PERF_COUNTER_RAWCOUNT,
  254. sizeof(DWORD),
  255. INFO_CACHE_TOTAL_URI_CACHED_OFFSET
  256. },
  257. { // URICacheHits
  258. sizeof(PERF_COUNTER_DEFINITION),
  259. INFO_CACHE_URI_HIT_COUNTER,
  260. 0,
  261. INFO_CACHE_URI_HIT_COUNTER,
  262. 0,
  263. -3,
  264. PERF_DETAIL_ADVANCED,
  265. PERF_COUNTER_RAWCOUNT,
  266. sizeof(DWORD),
  267. INFO_CACHE_URI_HIT_OFFSET
  268. },
  269. { // URICacheMisses
  270. sizeof(PERF_COUNTER_DEFINITION),
  271. INFO_CACHE_URI_MISS_COUNTER,
  272. 0,
  273. INFO_CACHE_URI_MISS_COUNTER,
  274. 0,
  275. -3,
  276. PERF_DETAIL_ADVANCED,
  277. PERF_COUNTER_RAWCOUNT,
  278. sizeof(DWORD),
  279. INFO_CACHE_URI_MISS_OFFSET
  280. },
  281. { // Calculated ratio of hits to misses - Numerator (cache hits)
  282. sizeof(PERF_COUNTER_DEFINITION),
  283. INFO_CACHE_URI_RATIO_COUNTER,
  284. 0,
  285. INFO_CACHE_URI_RATIO_COUNTER,
  286. 0,
  287. 0,
  288. PERF_DETAIL_ADVANCED,
  289. PERF_RAW_FRACTION,
  290. sizeof(DWORD),
  291. INFO_CACHE_URI_RATIO_OFFSET
  292. },
  293. { // Calculated ratio of hits to misses - Denominator, not displayed!
  294. sizeof(PERF_COUNTER_DEFINITION),
  295. INFO_CACHE_URI_RATIO_COUNTER_DENOM,
  296. 0,
  297. INFO_CACHE_URI_RATIO_COUNTER_DENOM,
  298. 0,
  299. 0,
  300. PERF_DETAIL_ADVANCED,
  301. PERF_RAW_BASE,
  302. sizeof(DWORD),
  303. INFO_CACHE_URI_RATIO_DENOM_OFFSET
  304. },
  305. { // URI Cache Flushes
  306. sizeof(PERF_COUNTER_DEFINITION),
  307. INFO_CACHE_URI_FLUSHES_COUNTER,
  308. 0,
  309. INFO_CACHE_URI_FLUSHES_COUNTER,
  310. 0,
  311. -1,
  312. PERF_DETAIL_ADVANCED,
  313. PERF_COUNTER_RAWCOUNT,
  314. sizeof(DWORD),
  315. INFO_CACHE_URI_FLUSHES_OFFSET
  316. },
  317. { // Total flushed URIs
  318. sizeof(PERF_COUNTER_DEFINITION),
  319. INFO_CACHE_TOTAL_FLUSHED_URI_COUNTER,
  320. 0,
  321. INFO_CACHE_TOTAL_FLUSHED_URI_COUNTER,
  322. 0,
  323. -1,
  324. PERF_DETAIL_ADVANCED,
  325. PERF_COUNTER_RAWCOUNT,
  326. sizeof(DWORD),
  327. INFO_CACHE_TOTAL_FLUSHED_URI_OFFSET
  328. },
  329. { // BlobCached
  330. sizeof(PERF_COUNTER_DEFINITION),
  331. INFO_CACHE_BLOB_CACHED_COUNTER,
  332. 0,
  333. INFO_CACHE_BLOB_CACHED_COUNTER,
  334. 0,
  335. -1,
  336. PERF_DETAIL_ADVANCED,
  337. PERF_COUNTER_RAWCOUNT,
  338. sizeof(DWORD),
  339. INFO_CACHE_BLOB_CACHED_OFFSET
  340. },
  341. { // TotalBlobCached
  342. sizeof(PERF_COUNTER_DEFINITION),
  343. INFO_CACHE_TOTAL_BLOB_CACHED_COUNTER,
  344. 0,
  345. INFO_CACHE_TOTAL_BLOB_CACHED_COUNTER,
  346. 0,
  347. -1,
  348. PERF_DETAIL_ADVANCED,
  349. PERF_COUNTER_RAWCOUNT,
  350. sizeof(DWORD),
  351. INFO_CACHE_TOTAL_BLOB_CACHED_OFFSET
  352. },
  353. { // BlobCacheHits
  354. sizeof(PERF_COUNTER_DEFINITION),
  355. INFO_CACHE_BLOB_HIT_COUNTER,
  356. 0,
  357. INFO_CACHE_BLOB_HIT_COUNTER,
  358. 0,
  359. -3,
  360. PERF_DETAIL_ADVANCED,
  361. PERF_COUNTER_RAWCOUNT,
  362. sizeof(DWORD),
  363. INFO_CACHE_BLOB_HIT_OFFSET
  364. },
  365. { // BlobCacheMisses
  366. sizeof(PERF_COUNTER_DEFINITION),
  367. INFO_CACHE_BLOB_MISS_COUNTER,
  368. 0,
  369. INFO_CACHE_BLOB_MISS_COUNTER,
  370. 0,
  371. -3,
  372. PERF_DETAIL_ADVANCED,
  373. PERF_COUNTER_RAWCOUNT,
  374. sizeof(DWORD),
  375. INFO_CACHE_BLOB_MISS_OFFSET
  376. },
  377. { // Calculated ratio of hits to misses - Numerator (cache hits)
  378. sizeof(PERF_COUNTER_DEFINITION),
  379. INFO_CACHE_BLOB_RATIO_COUNTER,
  380. 0,
  381. INFO_CACHE_BLOB_RATIO_COUNTER,
  382. 0,
  383. 0,
  384. PERF_DETAIL_ADVANCED,
  385. PERF_RAW_FRACTION,
  386. sizeof(DWORD),
  387. INFO_CACHE_BLOB_RATIO_OFFSET
  388. },
  389. { // Calculated ratio of hits to misses - Denominator, not displayed!
  390. sizeof(PERF_COUNTER_DEFINITION),
  391. INFO_CACHE_BLOB_RATIO_COUNTER_DENOM,
  392. 0,
  393. INFO_CACHE_BLOB_RATIO_COUNTER_DENOM,
  394. 0,
  395. 0,
  396. PERF_DETAIL_ADVANCED,
  397. PERF_RAW_BASE,
  398. sizeof(DWORD),
  399. INFO_CACHE_BLOB_RATIO_DENOM_OFFSET
  400. },
  401. { // Blob Cache Flushes
  402. sizeof(PERF_COUNTER_DEFINITION),
  403. INFO_CACHE_BLOB_FLUSHES_COUNTER,
  404. 0,
  405. INFO_CACHE_BLOB_FLUSHES_COUNTER,
  406. 0,
  407. -1,
  408. PERF_DETAIL_ADVANCED,
  409. PERF_COUNTER_RAWCOUNT,
  410. sizeof(DWORD),
  411. INFO_CACHE_BLOB_FLUSHES_OFFSET
  412. },
  413. { // Total flushed Blobs
  414. sizeof(PERF_COUNTER_DEFINITION),
  415. INFO_CACHE_TOTAL_FLUSHED_BLOB_COUNTER,
  416. 0,
  417. INFO_CACHE_TOTAL_FLUSHED_BLOB_COUNTER,
  418. 0,
  419. -1,
  420. PERF_DETAIL_ADVANCED,
  421. PERF_COUNTER_RAWCOUNT,
  422. sizeof(DWORD),
  423. INFO_CACHE_TOTAL_FLUSHED_BLOB_OFFSET
  424. }
  425. };