Source code of Windows XP (NT5)
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.

432 lines
10 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datalogi.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Physical Disk Performance data objects
  8. Created:
  9. Bob Watson 22-Oct-1996
  10. Revision History:
  11. None.
  12. --*/
  13. //
  14. // Include Files
  15. //
  16. #include <windows.h>
  17. #include <winperf.h>
  18. #include <ntprfctr.h>
  19. #include <perfutil.h>
  20. #include "datalogi.h"
  21. // dummy variable for field sizing.
  22. static LDISK_COUNTER_DATA lcd;
  23. //
  24. // Constant structure initializations
  25. // defined in datalogi.h
  26. //
  27. LDISK_DATA_DEFINITION LogicalDiskDataDefinition = {
  28. { 0,
  29. sizeof(LDISK_DATA_DEFINITION),
  30. sizeof(PERF_OBJECT_TYPE),
  31. LOGICAL_DISK_OBJECT_TITLE_INDEX,
  32. 0,
  33. 237,
  34. 0,
  35. PERF_DETAIL_NOVICE,
  36. (sizeof(LDISK_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  37. sizeof(PERF_COUNTER_DEFINITION),
  38. 5,
  39. 0,
  40. UNICODE_CODE_PAGE,
  41. {0L,0L},
  42. {0L,0L}
  43. },
  44. { sizeof(PERF_COUNTER_DEFINITION),
  45. 408,
  46. 0,
  47. 409,
  48. 0,
  49. 0,
  50. PERF_DETAIL_NOVICE,
  51. PERF_RAW_FRACTION,
  52. sizeof (lcd.DiskFreeMbytes1),
  53. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskFreeMbytes1
  54. },
  55. { sizeof(PERF_COUNTER_DEFINITION),
  56. 408,
  57. 0,
  58. 409,
  59. 0,
  60. 0,
  61. PERF_DETAIL_NOVICE,
  62. PERF_RAW_BASE,
  63. sizeof (lcd.DiskTotalMbytes),
  64. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTotalMbytes
  65. },
  66. { sizeof(PERF_COUNTER_DEFINITION),
  67. 410,
  68. 0,
  69. 411,
  70. 0,
  71. 0,
  72. PERF_DETAIL_NOVICE,
  73. PERF_COUNTER_RAWCOUNT,
  74. sizeof (lcd.DiskFreeMbytes2),
  75. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskFreeMbytes2
  76. },
  77. { sizeof(PERF_COUNTER_DEFINITION),
  78. 198,
  79. 0,
  80. 199,
  81. 0,
  82. 1,
  83. PERF_DETAIL_NOVICE,
  84. PERF_COUNTER_RAWCOUNT,
  85. sizeof (lcd.DiskCurrentQueueLength),
  86. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskCurrentQueueLength
  87. },
  88. { sizeof(PERF_COUNTER_DEFINITION),
  89. 200,
  90. 0,
  91. 201,
  92. 0,
  93. 0,
  94. PERF_DETAIL_NOVICE,
  95. PERF_PRECISION_100NS_TIMER,
  96. sizeof (lcd.DiskTime),
  97. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTime
  98. },
  99. { sizeof(PERF_COUNTER_DEFINITION),
  100. 200,
  101. 0,
  102. 201,
  103. 0,
  104. 0,
  105. PERF_DETAIL_NOVICE,
  106. PERF_PRECISION_TIMESTAMP,
  107. sizeof (lcd.DiskTimeTimestamp),
  108. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTimeTimestamp
  109. },
  110. { sizeof(PERF_COUNTER_DEFINITION),
  111. 1400,
  112. 0,
  113. 1401,
  114. 0,
  115. 2,
  116. PERF_DETAIL_NOVICE,
  117. PERF_COUNTER_100NS_QUEUELEN_TYPE,
  118. sizeof (lcd.DiskAvgQueueLength),
  119. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgQueueLength
  120. },
  121. { sizeof(PERF_COUNTER_DEFINITION),
  122. 202,
  123. 0,
  124. 203,
  125. 0,
  126. 0,
  127. PERF_DETAIL_NOVICE,
  128. PERF_PRECISION_100NS_TIMER,
  129. sizeof (lcd.DiskReadTime),
  130. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReadTime
  131. },
  132. { sizeof(PERF_COUNTER_DEFINITION),
  133. 202,
  134. 0,
  135. 203,
  136. 0,
  137. 0,
  138. PERF_DETAIL_NOVICE,
  139. PERF_PRECISION_TIMESTAMP,
  140. sizeof (lcd.DiskTimeTimestamp),
  141. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTimeTimestamp
  142. },
  143. { sizeof(PERF_COUNTER_DEFINITION),
  144. 1402,
  145. 0,
  146. 1403,
  147. 0,
  148. 2,
  149. PERF_DETAIL_NOVICE,
  150. PERF_COUNTER_100NS_QUEUELEN_TYPE,
  151. sizeof (lcd.DiskReadQueueLength),
  152. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReadQueueLength
  153. },
  154. { sizeof(PERF_COUNTER_DEFINITION),
  155. 204,
  156. 0,
  157. 205,
  158. 0,
  159. 0,
  160. PERF_DETAIL_NOVICE,
  161. PERF_PRECISION_100NS_TIMER,
  162. sizeof (lcd.DiskWriteTime),
  163. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWriteTime
  164. },
  165. { sizeof(PERF_COUNTER_DEFINITION),
  166. 204,
  167. 0,
  168. 205,
  169. 0,
  170. 0,
  171. PERF_DETAIL_NOVICE,
  172. PERF_PRECISION_TIMESTAMP,
  173. sizeof (lcd.DiskTimeTimestamp),
  174. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTimeTimestamp
  175. },
  176. { sizeof(PERF_COUNTER_DEFINITION),
  177. 1404,
  178. 0,
  179. 1405,
  180. 0,
  181. 2,
  182. PERF_DETAIL_NOVICE,
  183. PERF_COUNTER_100NS_QUEUELEN_TYPE,
  184. sizeof (lcd.DiskWriteQueueLength),
  185. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWriteQueueLength
  186. },
  187. { sizeof(PERF_COUNTER_DEFINITION),
  188. 206,
  189. 0,
  190. 207,
  191. 0,
  192. 3,
  193. PERF_DETAIL_ADVANCED,
  194. PERF_AVERAGE_TIMER,
  195. sizeof (lcd.DiskAvgTime),
  196. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgTime
  197. },
  198. { sizeof(PERF_COUNTER_DEFINITION),
  199. 206,
  200. 0,
  201. 207,
  202. 0,
  203. 0,
  204. PERF_DETAIL_ADVANCED,
  205. PERF_AVERAGE_BASE,
  206. sizeof (lcd.DiskTransfersBase1),
  207. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTransfersBase1
  208. },
  209. { sizeof(PERF_COUNTER_DEFINITION),
  210. 208,
  211. 0,
  212. 209,
  213. 0,
  214. 3,
  215. PERF_DETAIL_ADVANCED,
  216. PERF_AVERAGE_TIMER,
  217. sizeof (lcd.DiskAvgReadTime),
  218. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgReadTime
  219. },
  220. { sizeof(PERF_COUNTER_DEFINITION),
  221. 208,
  222. 0,
  223. 209,
  224. 0,
  225. 0,
  226. PERF_DETAIL_ADVANCED,
  227. PERF_AVERAGE_BASE,
  228. sizeof (lcd.DiskReadsBase1),
  229. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReadsBase1
  230. },
  231. { sizeof(PERF_COUNTER_DEFINITION),
  232. 210,
  233. 0,
  234. 211,
  235. 0,
  236. 3,
  237. PERF_DETAIL_ADVANCED,
  238. PERF_AVERAGE_TIMER,
  239. sizeof (lcd.DiskAvgWriteTime),
  240. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgWriteTime
  241. },
  242. { sizeof(PERF_COUNTER_DEFINITION),
  243. 210,
  244. 0,
  245. 211,
  246. 0,
  247. 0,
  248. PERF_DETAIL_ADVANCED,
  249. PERF_AVERAGE_BASE,
  250. sizeof (lcd.DiskWritesBase1),
  251. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWritesBase1
  252. },
  253. { sizeof(PERF_COUNTER_DEFINITION),
  254. 212,
  255. 0,
  256. 213,
  257. 0,
  258. 0,
  259. PERF_DETAIL_NOVICE,
  260. PERF_COUNTER_COUNTER,
  261. sizeof (lcd.DiskTransfers),
  262. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTransfers
  263. },
  264. { sizeof(PERF_COUNTER_DEFINITION),
  265. 214,
  266. 0,
  267. 215,
  268. 0,
  269. 0,
  270. PERF_DETAIL_NOVICE,
  271. PERF_COUNTER_COUNTER,
  272. sizeof (lcd.DiskReads),
  273. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReads
  274. },
  275. { sizeof(PERF_COUNTER_DEFINITION),
  276. 216,
  277. 0,
  278. 217,
  279. 0,
  280. 0,
  281. PERF_DETAIL_NOVICE,
  282. PERF_COUNTER_COUNTER,
  283. sizeof (lcd.DiskWrites),
  284. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWrites
  285. },
  286. { sizeof(PERF_COUNTER_DEFINITION),
  287. 218,
  288. 0,
  289. 219,
  290. 0,
  291. -4,
  292. PERF_DETAIL_ADVANCED,
  293. PERF_COUNTER_BULK_COUNT,
  294. sizeof (lcd.DiskBytes),
  295. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskBytes
  296. },
  297. { sizeof(PERF_COUNTER_DEFINITION),
  298. 220,
  299. 0,
  300. 221,
  301. 0,
  302. -4,
  303. PERF_DETAIL_ADVANCED,
  304. PERF_COUNTER_BULK_COUNT,
  305. sizeof (lcd.DiskReadBytes),
  306. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReadBytes
  307. },
  308. { sizeof(PERF_COUNTER_DEFINITION),
  309. 222,
  310. 0,
  311. 223,
  312. 0,
  313. -4,
  314. PERF_DETAIL_ADVANCED,
  315. PERF_COUNTER_BULK_COUNT,
  316. sizeof (lcd.DiskWriteBytes),
  317. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWriteBytes
  318. },
  319. { sizeof(PERF_COUNTER_DEFINITION),
  320. 224,
  321. 0,
  322. 225,
  323. 0,
  324. -2,
  325. PERF_DETAIL_EXPERT,
  326. PERF_AVERAGE_BULK,
  327. sizeof (lcd.DiskAvgBytes),
  328. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgBytes
  329. },
  330. { sizeof(PERF_COUNTER_DEFINITION),
  331. 224,
  332. 0,
  333. 225,
  334. 0,
  335. 0,
  336. PERF_DETAIL_EXPERT,
  337. PERF_AVERAGE_BASE,
  338. sizeof (lcd.DiskTransfersBase2),
  339. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTransfersBase2
  340. },
  341. { sizeof(PERF_COUNTER_DEFINITION),
  342. 226,
  343. 0,
  344. 227,
  345. 0,
  346. -2,
  347. PERF_DETAIL_EXPERT,
  348. PERF_AVERAGE_BULK,
  349. sizeof (lcd.DiskAvgReadBytes),
  350. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgReadBytes
  351. },
  352. { sizeof(PERF_COUNTER_DEFINITION),
  353. 226,
  354. 0,
  355. 227,
  356. 0,
  357. 0,
  358. PERF_DETAIL_EXPERT,
  359. PERF_AVERAGE_BASE,
  360. sizeof (lcd.DiskReadsBase2),
  361. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskReadsBase2
  362. },
  363. { sizeof(PERF_COUNTER_DEFINITION),
  364. 228,
  365. 0,
  366. 229,
  367. 0,
  368. -2,
  369. PERF_DETAIL_EXPERT,
  370. PERF_AVERAGE_BULK,
  371. sizeof (lcd.DiskAvgWriteBytes),
  372. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskAvgWriteBytes
  373. },
  374. { sizeof(PERF_COUNTER_DEFINITION),
  375. 228,
  376. 0,
  377. 229,
  378. 0,
  379. 0,
  380. PERF_DETAIL_EXPERT,
  381. PERF_AVERAGE_BASE,
  382. sizeof (lcd.DiskWritesBase2),
  383. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskWritesBase2
  384. },
  385. { sizeof(PERF_COUNTER_DEFINITION),
  386. 1482,
  387. 0,
  388. 1483,
  389. 0,
  390. 0,
  391. PERF_DETAIL_ADVANCED,
  392. PERF_PRECISION_100NS_TIMER,
  393. sizeof (lcd.IdleTime),
  394. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->IdleTime
  395. },
  396. { sizeof(PERF_COUNTER_DEFINITION),
  397. 1482,
  398. 0,
  399. 1483,
  400. 0,
  401. 0,
  402. PERF_DETAIL_NOVICE,
  403. PERF_PRECISION_TIMESTAMP,
  404. sizeof (lcd.DiskTimeTimestamp),
  405. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->DiskTimeTimestamp
  406. },
  407. { sizeof(PERF_COUNTER_DEFINITION),
  408. 1484,
  409. 0,
  410. 1485,
  411. 0,
  412. 0,
  413. PERF_DETAIL_ADVANCED,
  414. PERF_COUNTER_COUNTER,
  415. sizeof (lcd.SplitCount),
  416. (DWORD)(ULONG_PTR)&((PLDISK_COUNTER_DATA)0)->SplitCount
  417. }
  418. };