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.

466 lines
11 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datardr.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Redirector 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 "datardr.h"
  21. // dummy variable for field sizing.
  22. static RDR_COUNTER_DATA rcd;
  23. //
  24. // Constant structure initializations
  25. // defined in datardr.h
  26. //
  27. RDR_DATA_DEFINITION RdrDataDefinition = {
  28. { sizeof(RDR_DATA_DEFINITION) + sizeof(RDR_COUNTER_DATA),
  29. sizeof(RDR_DATA_DEFINITION),
  30. sizeof(PERF_OBJECT_TYPE),
  31. REDIRECTOR_OBJECT_TITLE_INDEX,
  32. 0,
  33. 263,
  34. 0,
  35. PERF_DETAIL_NOVICE,
  36. (sizeof(RDR_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  37. sizeof(PERF_COUNTER_DEFINITION),
  38. 0,
  39. -1,
  40. UNICODE_CODE_PAGE,
  41. {0L,0L},
  42. {0L,0L}
  43. },
  44. { sizeof(PERF_COUNTER_DEFINITION),
  45. 388,
  46. 0,
  47. 389,
  48. 0,
  49. -4,
  50. PERF_DETAIL_NOVICE,
  51. PERF_COUNTER_BULK_COUNT,
  52. sizeof (rcd.Bytes),
  53. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Bytes
  54. },
  55. { sizeof(PERF_COUNTER_DEFINITION),
  56. 406,
  57. 0,
  58. 391,
  59. 0,
  60. 0,
  61. PERF_DETAIL_NOVICE,
  62. PERF_COUNTER_COUNTER,
  63. sizeof (rcd.IoOperations),
  64. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->IoOperations
  65. },
  66. { sizeof(PERF_COUNTER_DEFINITION),
  67. 400,
  68. 0,
  69. 401,
  70. 0,
  71. -1,
  72. PERF_DETAIL_NOVICE,
  73. PERF_COUNTER_BULK_COUNT,
  74. sizeof (rcd.Smbs),
  75. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Smbs
  76. },
  77. { sizeof(PERF_COUNTER_DEFINITION),
  78. 264,
  79. 0,
  80. 265,
  81. 0,
  82. -4,
  83. PERF_DETAIL_ADVANCED,
  84. PERF_COUNTER_BULK_COUNT,
  85. sizeof (rcd.BytesReceived),
  86. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->BytesReceived
  87. },
  88. { sizeof(PERF_COUNTER_DEFINITION),
  89. 266,
  90. 0,
  91. 267,
  92. 0,
  93. -1,
  94. PERF_DETAIL_ADVANCED,
  95. PERF_COUNTER_BULK_COUNT,
  96. sizeof (rcd.SmbsReceived),
  97. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->SmbsReceived
  98. },
  99. { sizeof(PERF_COUNTER_DEFINITION),
  100. 268,
  101. 0,
  102. 269,
  103. 0,
  104. -4,
  105. PERF_DETAIL_EXPERT,
  106. PERF_COUNTER_BULK_COUNT,
  107. sizeof (rcd.PagingReadBytesRequested),
  108. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->PagingReadBytesRequested
  109. },
  110. { sizeof(PERF_COUNTER_DEFINITION),
  111. 270,
  112. 0,
  113. 271,
  114. 0,
  115. -4,
  116. PERF_DETAIL_EXPERT,
  117. PERF_COUNTER_BULK_COUNT,
  118. sizeof (rcd.NonPagingReadBytesRequested),
  119. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->NonPagingReadBytesRequested
  120. },
  121. { sizeof(PERF_COUNTER_DEFINITION),
  122. 272,
  123. 0,
  124. 273,
  125. 0,
  126. -4,
  127. PERF_DETAIL_EXPERT,
  128. PERF_COUNTER_BULK_COUNT,
  129. sizeof (rcd.CacheReadBytesRequested),
  130. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->CacheReadBytesRequested
  131. },
  132. { sizeof(PERF_COUNTER_DEFINITION),
  133. 274,
  134. 0,
  135. 275,
  136. 0,
  137. -4,
  138. PERF_DETAIL_NOVICE,
  139. PERF_COUNTER_BULK_COUNT,
  140. sizeof (rcd.NetworkReadBytesRequested),
  141. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->NetworkReadBytesRequested
  142. },
  143. { sizeof(PERF_COUNTER_DEFINITION),
  144. 276,
  145. 0,
  146. 277,
  147. 0,
  148. -4,
  149. PERF_DETAIL_ADVANCED,
  150. PERF_COUNTER_BULK_COUNT,
  151. sizeof (rcd.BytesTransmitted),
  152. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->BytesTransmitted
  153. },
  154. { sizeof(PERF_COUNTER_DEFINITION),
  155. 278,
  156. 0,
  157. 279,
  158. 0,
  159. -1,
  160. PERF_DETAIL_ADVANCED,
  161. PERF_COUNTER_BULK_COUNT,
  162. sizeof (rcd.SmbsTransmitted),
  163. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->SmbsTransmitted
  164. },
  165. { sizeof(PERF_COUNTER_DEFINITION),
  166. 280,
  167. 0,
  168. 281,
  169. 0,
  170. -4,
  171. PERF_DETAIL_EXPERT,
  172. PERF_COUNTER_BULK_COUNT,
  173. sizeof (rcd.PagingReadBytesRequested),
  174. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->PagingReadBytesRequested
  175. },
  176. { sizeof(PERF_COUNTER_DEFINITION),
  177. 282,
  178. 0,
  179. 283,
  180. 0,
  181. -4,
  182. PERF_DETAIL_EXPERT,
  183. PERF_COUNTER_BULK_COUNT,
  184. sizeof (rcd.NonPagingWriteBytesRequested),
  185. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->NonPagingWriteBytesRequested
  186. },
  187. { sizeof(PERF_COUNTER_DEFINITION),
  188. 284,
  189. 0,
  190. 285,
  191. 0,
  192. -4,
  193. PERF_DETAIL_EXPERT,
  194. PERF_COUNTER_BULK_COUNT,
  195. sizeof (rcd.CacheWriteBytesRequested),
  196. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->CacheWriteBytesRequested
  197. },
  198. { sizeof(PERF_COUNTER_DEFINITION),
  199. 286,
  200. 0,
  201. 287,
  202. 0,
  203. -4,
  204. PERF_DETAIL_NOVICE,
  205. PERF_COUNTER_BULK_COUNT,
  206. sizeof (rcd.NetworkWriteBytesRequested),
  207. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->NetworkWriteBytesRequested
  208. },
  209. { sizeof(PERF_COUNTER_DEFINITION),
  210. 10,
  211. 0,
  212. 289,
  213. 0,
  214. 0,
  215. PERF_DETAIL_NOVICE,
  216. PERF_COUNTER_COUNTER,
  217. sizeof (rcd.ReadOperations),
  218. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->ReadOperations
  219. },
  220. { sizeof(PERF_COUNTER_DEFINITION),
  221. 290,
  222. 0,
  223. 291,
  224. 0,
  225. -1,
  226. PERF_DETAIL_ADVANCED,
  227. PERF_COUNTER_COUNTER,
  228. sizeof (rcd.RandomReadOperations),
  229. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->RandomReadOperations
  230. },
  231. { sizeof(PERF_COUNTER_DEFINITION),
  232. 292,
  233. 0,
  234. 293,
  235. 0,
  236. -1,
  237. PERF_DETAIL_ADVANCED,
  238. PERF_COUNTER_COUNTER,
  239. sizeof (rcd.ReadSmbs),
  240. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->ReadSmbs
  241. },
  242. { sizeof(PERF_COUNTER_DEFINITION),
  243. 294,
  244. 0,
  245. 295,
  246. 0,
  247. 0,
  248. PERF_DETAIL_EXPERT,
  249. PERF_COUNTER_COUNTER,
  250. sizeof (rcd.LargeReadSmbs),
  251. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->LargeReadSmbs
  252. },
  253. { sizeof(PERF_COUNTER_DEFINITION),
  254. 296,
  255. 0,
  256. 297,
  257. 0,
  258. -1,
  259. PERF_DETAIL_EXPERT,
  260. PERF_COUNTER_COUNTER,
  261. sizeof (rcd.SmallReadSmbs),
  262. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->SmallReadSmbs
  263. },
  264. { sizeof(PERF_COUNTER_DEFINITION),
  265. 12,
  266. 0,
  267. 299,
  268. 0,
  269. 0,
  270. PERF_DETAIL_NOVICE,
  271. PERF_COUNTER_COUNTER,
  272. sizeof (rcd.WriteOperations),
  273. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->WriteOperations
  274. },
  275. { sizeof(PERF_COUNTER_DEFINITION),
  276. 300,
  277. 0,
  278. 301,
  279. 0,
  280. -1,
  281. PERF_DETAIL_ADVANCED,
  282. PERF_COUNTER_COUNTER,
  283. sizeof (rcd.RandomWriteOperations),
  284. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->RandomWriteOperations
  285. },
  286. { sizeof(PERF_COUNTER_DEFINITION),
  287. 302,
  288. 0,
  289. 303,
  290. 0,
  291. -1,
  292. PERF_DETAIL_ADVANCED,
  293. PERF_COUNTER_COUNTER,
  294. sizeof (rcd.WriteSmbs),
  295. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->WriteSmbs
  296. },
  297. { sizeof(PERF_COUNTER_DEFINITION),
  298. 304,
  299. 0,
  300. 305,
  301. 0,
  302. 0,
  303. PERF_DETAIL_EXPERT,
  304. PERF_COUNTER_COUNTER,
  305. sizeof (rcd.LargeWriteSmbs),
  306. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->LargeWriteSmbs
  307. },
  308. { sizeof(PERF_COUNTER_DEFINITION),
  309. 306,
  310. 0,
  311. 307,
  312. 0,
  313. -1,
  314. PERF_DETAIL_EXPERT,
  315. PERF_COUNTER_COUNTER,
  316. sizeof (rcd.SmallWriteSmbs),
  317. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->SmallWriteSmbs
  318. },
  319. { sizeof(PERF_COUNTER_DEFINITION),
  320. 308,
  321. 0,
  322. 309,
  323. 0,
  324. 0,
  325. PERF_DETAIL_ADVANCED,
  326. PERF_COUNTER_COUNTER,
  327. sizeof (rcd.RawReadsDenied),
  328. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->RawReadsDenied
  329. },
  330. { sizeof(PERF_COUNTER_DEFINITION),
  331. 310,
  332. 0,
  333. 311,
  334. 0,
  335. 0,
  336. PERF_DETAIL_ADVANCED,
  337. PERF_COUNTER_COUNTER,
  338. sizeof (rcd.RawWritesDenied),
  339. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->RawWritesDenied
  340. },
  341. { sizeof(PERF_COUNTER_DEFINITION),
  342. 312,
  343. 0,
  344. 313,
  345. 0,
  346. 0,
  347. PERF_DETAIL_NOVICE,
  348. PERF_COUNTER_COUNTER,
  349. sizeof (rcd.NetworkErrors),
  350. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->NetworkErrors
  351. },
  352. { sizeof(PERF_COUNTER_DEFINITION),
  353. 314,
  354. 0,
  355. 315,
  356. 0,
  357. 0,
  358. PERF_DETAIL_NOVICE,
  359. PERF_COUNTER_RAWCOUNT,
  360. sizeof (rcd.Sessions),
  361. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Sessions
  362. },
  363. { sizeof(PERF_COUNTER_DEFINITION),
  364. 316,
  365. 0,
  366. 317,
  367. 0,
  368. 0,
  369. PERF_DETAIL_ADVANCED,
  370. PERF_COUNTER_RAWCOUNT,
  371. sizeof (rcd.Reconnects),
  372. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Reconnects
  373. },
  374. { sizeof(PERF_COUNTER_DEFINITION),
  375. 318,
  376. 0,
  377. 319,
  378. 0,
  379. 0,
  380. PERF_DETAIL_ADVANCED,
  381. PERF_COUNTER_RAWCOUNT,
  382. sizeof (rcd.CoreConnects),
  383. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->CoreConnects
  384. },
  385. { sizeof(PERF_COUNTER_DEFINITION),
  386. 320,
  387. 0,
  388. 321,
  389. 0,
  390. 0,
  391. PERF_DETAIL_ADVANCED,
  392. PERF_COUNTER_RAWCOUNT,
  393. sizeof (rcd.Lanman20Connects),
  394. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Lanman20Connects
  395. },
  396. { sizeof(PERF_COUNTER_DEFINITION),
  397. 322,
  398. 0,
  399. 323,
  400. 0,
  401. 0,
  402. PERF_DETAIL_ADVANCED,
  403. PERF_COUNTER_RAWCOUNT,
  404. sizeof (rcd.Lanman21Connects),
  405. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->Lanman21Connects
  406. },
  407. { sizeof(PERF_COUNTER_DEFINITION),
  408. 324,
  409. 0,
  410. 325,
  411. 0,
  412. 0,
  413. PERF_DETAIL_ADVANCED,
  414. PERF_COUNTER_RAWCOUNT,
  415. sizeof (rcd.LanmanNtConnects),
  416. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->LanmanNtConnects
  417. },
  418. { sizeof(PERF_COUNTER_DEFINITION),
  419. 326,
  420. 0,
  421. 327,
  422. 0,
  423. 0,
  424. PERF_DETAIL_ADVANCED,
  425. PERF_COUNTER_RAWCOUNT,
  426. sizeof (rcd.ServerDisconnects),
  427. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->ServerDisconnects
  428. },
  429. { sizeof(PERF_COUNTER_DEFINITION),
  430. 328,
  431. 0,
  432. 329,
  433. 0,
  434. 0,
  435. PERF_DETAIL_ADVANCED,
  436. PERF_COUNTER_RAWCOUNT,
  437. sizeof (rcd.HungSessions),
  438. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->HungSessions
  439. },
  440. { sizeof(PERF_COUNTER_DEFINITION),
  441. 392,
  442. 0,
  443. 393,
  444. 0,
  445. 0,
  446. PERF_DETAIL_ADVANCED,
  447. PERF_COUNTER_RAWCOUNT,
  448. sizeof (rcd.CurrentCommands),
  449. (DWORD)(ULONG_PTR)&((PRDR_COUNTER_DATA)0)->CurrentCommands
  450. }
  451. };
  452.