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.

345 lines
8.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datasrv.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Server 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 "datasrv.h"
  21. // dummy variable for field sizing.
  22. static SRV_COUNTER_DATA scd;
  23. //
  24. // Constant structure initializations
  25. // defined in datasrv.h
  26. //
  27. SRV_DATA_DEFINITION SrvDataDefinition = {
  28. { sizeof(SRV_DATA_DEFINITION) + sizeof(SRV_COUNTER_DATA),
  29. sizeof(SRV_DATA_DEFINITION),
  30. sizeof(PERF_OBJECT_TYPE),
  31. SERVER_OBJECT_TITLE_INDEX,
  32. 0,
  33. 331,
  34. 0,
  35. PERF_DETAIL_NOVICE,
  36. (sizeof(SRV_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. 395,
  48. 0,
  49. -4,
  50. PERF_DETAIL_NOVICE,
  51. PERF_COUNTER_BULK_COUNT,
  52. sizeof (scd.TotalBytes),
  53. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->TotalBytes
  54. },
  55. { sizeof(PERF_COUNTER_DEFINITION),
  56. 264,
  57. 0,
  58. 333,
  59. 0,
  60. -4,
  61. PERF_DETAIL_ADVANCED,
  62. PERF_COUNTER_BULK_COUNT,
  63. sizeof (scd.TotalBytesReceived),
  64. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->TotalBytesReceived
  65. },
  66. { sizeof(PERF_COUNTER_DEFINITION),
  67. 276,
  68. 0,
  69. 335,
  70. 0,
  71. -4,
  72. PERF_DETAIL_ADVANCED,
  73. PERF_COUNTER_BULK_COUNT,
  74. sizeof (scd.TotalBytesSent),
  75. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->TotalBytesSent
  76. },
  77. { sizeof(PERF_COUNTER_DEFINITION),
  78. 340,
  79. 0,
  80. 341,
  81. 0,
  82. 0,
  83. PERF_DETAIL_ADVANCED,
  84. PERF_COUNTER_RAWCOUNT,
  85. sizeof (scd.SessionsTimedOut),
  86. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->SessionsTimedOut
  87. },
  88. { sizeof(PERF_COUNTER_DEFINITION),
  89. 342,
  90. 0,
  91. 343,
  92. 0,
  93. 0,
  94. PERF_DETAIL_ADVANCED,
  95. PERF_COUNTER_RAWCOUNT,
  96. sizeof (scd.SessionsErroredOut),
  97. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->SessionsErroredOut
  98. },
  99. { sizeof(PERF_COUNTER_DEFINITION),
  100. 344,
  101. 0,
  102. 345,
  103. 0,
  104. 0,
  105. PERF_DETAIL_ADVANCED,
  106. PERF_COUNTER_RAWCOUNT,
  107. sizeof (scd.SessionsLoggedOff),
  108. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->SessionsLoggedOff
  109. },
  110. { sizeof(PERF_COUNTER_DEFINITION),
  111. 346,
  112. 0,
  113. 347,
  114. 0,
  115. 0,
  116. PERF_DETAIL_ADVANCED,
  117. PERF_COUNTER_RAWCOUNT,
  118. sizeof (scd.SessionsForcedLogOff),
  119. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->SessionsForcedLogOff
  120. },
  121. { sizeof(PERF_COUNTER_DEFINITION),
  122. 348,
  123. 0,
  124. 349,
  125. 0,
  126. 0,
  127. PERF_DETAIL_ADVANCED,
  128. PERF_COUNTER_RAWCOUNT,
  129. sizeof (scd.LogonErrors),
  130. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->LogonErrors
  131. },
  132. { sizeof(PERF_COUNTER_DEFINITION),
  133. 350,
  134. 0,
  135. 351,
  136. 0,
  137. 0,
  138. PERF_DETAIL_NOVICE,
  139. PERF_COUNTER_RAWCOUNT,
  140. sizeof (scd.AccessPermissionErrors),
  141. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->AccessPermissionErrors
  142. },
  143. { sizeof(PERF_COUNTER_DEFINITION),
  144. 352,
  145. 0,
  146. 353,
  147. 0,
  148. 0,
  149. PERF_DETAIL_ADVANCED,
  150. PERF_COUNTER_RAWCOUNT,
  151. sizeof (scd.GrantedAccessErrors),
  152. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->GrantedAccessErrors
  153. },
  154. { sizeof(PERF_COUNTER_DEFINITION),
  155. 354,
  156. 0,
  157. 355,
  158. 0,
  159. 0,
  160. PERF_DETAIL_EXPERT,
  161. PERF_COUNTER_RAWCOUNT,
  162. sizeof (scd.SystemErrors),
  163. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->SystemErrors
  164. },
  165. { sizeof(PERF_COUNTER_DEFINITION),
  166. 356,
  167. 0,
  168. 357,
  169. 0,
  170. 0,
  171. PERF_DETAIL_ADVANCED,
  172. PERF_COUNTER_COUNTER,
  173. sizeof (scd.BlockingSmbsRejected),
  174. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->BlockingSmbsRejected
  175. },
  176. { sizeof(PERF_COUNTER_DEFINITION),
  177. 358,
  178. 0,
  179. 359,
  180. 0,
  181. 0,
  182. PERF_DETAIL_ADVANCED,
  183. PERF_COUNTER_COUNTER,
  184. sizeof (scd.WorkItemShortages),
  185. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->WorkItemShortages
  186. },
  187. { sizeof(PERF_COUNTER_DEFINITION),
  188. 360,
  189. 0,
  190. 361,
  191. 0,
  192. -3,
  193. PERF_DETAIL_NOVICE,
  194. PERF_COUNTER_RAWCOUNT,
  195. sizeof (scd.TotalFilesOpened),
  196. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->TotalFilesOpened
  197. },
  198. { sizeof(PERF_COUNTER_DEFINITION),
  199. 362,
  200. 0,
  201. 363,
  202. 0,
  203. 0,
  204. PERF_DETAIL_NOVICE,
  205. PERF_COUNTER_RAWCOUNT,
  206. sizeof (scd.CurrentOpenFiles),
  207. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->CurrentOpenFiles
  208. },
  209. { sizeof(PERF_COUNTER_DEFINITION),
  210. 314,
  211. 0,
  212. 365,
  213. 0,
  214. 0,
  215. PERF_DETAIL_NOVICE,
  216. PERF_COUNTER_RAWCOUNT,
  217. sizeof (scd.CurrentSessions),
  218. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->CurrentSessions
  219. },
  220. { sizeof(PERF_COUNTER_DEFINITION),
  221. 366,
  222. 0,
  223. 367,
  224. 0,
  225. 0,
  226. PERF_DETAIL_ADVANCED,
  227. PERF_COUNTER_RAWCOUNT,
  228. sizeof (scd.CurrentOpenSearches),
  229. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->CurrentOpenSearches
  230. },
  231. { sizeof(PERF_COUNTER_DEFINITION),
  232. 58,
  233. 0,
  234. 369,
  235. 0,
  236. -4,
  237. PERF_DETAIL_EXPERT,
  238. PERF_COUNTER_RAWCOUNT,
  239. sizeof (scd.CurrentNonPagedPoolUsage),
  240. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->CurrentNonPagedPoolUsage
  241. },
  242. { sizeof(PERF_COUNTER_DEFINITION),
  243. 370,
  244. 0,
  245. 371,
  246. 0,
  247. 0,
  248. PERF_DETAIL_WIZARD,
  249. PERF_COUNTER_COUNTER,
  250. sizeof (scd.NonPagedPoolFailures),
  251. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->NonPagedPoolFailures
  252. },
  253. { sizeof(PERF_COUNTER_DEFINITION),
  254. 372,
  255. 0,
  256. 373,
  257. 0,
  258. -4,
  259. PERF_DETAIL_EXPERT,
  260. PERF_COUNTER_RAWCOUNT,
  261. sizeof (scd.PeakNonPagedPoolUsage),
  262. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->PeakNonPagedPoolUsage
  263. },
  264. { sizeof(PERF_COUNTER_DEFINITION),
  265. 56,
  266. 0,
  267. 375,
  268. 0,
  269. -4,
  270. PERF_DETAIL_EXPERT,
  271. PERF_COUNTER_RAWCOUNT,
  272. sizeof (scd.CurrentPagedPoolUsage),
  273. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->CurrentPagedPoolUsage
  274. },
  275. { sizeof(PERF_COUNTER_DEFINITION),
  276. 376,
  277. 0,
  278. 377,
  279. 0,
  280. 0,
  281. PERF_DETAIL_WIZARD,
  282. PERF_COUNTER_RAWCOUNT,
  283. sizeof (scd.PagedPoolFailures),
  284. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->PagedPoolFailures
  285. },
  286. { sizeof(PERF_COUNTER_DEFINITION),
  287. 378,
  288. 0,
  289. 379,
  290. 0,
  291. -4,
  292. PERF_DETAIL_ADVANCED,
  293. PERF_COUNTER_RAWCOUNT,
  294. sizeof (scd.PeakPagedPoolUsage),
  295. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->PeakPagedPoolUsage
  296. },
  297. { sizeof(PERF_COUNTER_DEFINITION),
  298. 404,
  299. 0,
  300. 405,
  301. 0,
  302. -1,
  303. PERF_DETAIL_NOVICE,
  304. PERF_COUNTER_COUNTER,
  305. sizeof (scd.ContextBlockQueueRate),
  306. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->ContextBlockQueueRate
  307. },
  308. { sizeof(PERF_COUNTER_DEFINITION),
  309. 692,
  310. 0,
  311. 693,
  312. 0,
  313. 1,
  314. PERF_DETAIL_NOVICE,
  315. PERF_COUNTER_COUNTER,
  316. sizeof (scd.NetLogon),
  317. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->NetLogon
  318. },
  319. { sizeof(PERF_COUNTER_DEFINITION),
  320. 1260,
  321. 0,
  322. 1261,
  323. 0,
  324. 1,
  325. PERF_DETAIL_NOVICE,
  326. PERF_COUNTER_RAWCOUNT,
  327. sizeof (scd.NetLogonTotal),
  328. (DWORD)(ULONG_PTR)&((PSRV_COUNTER_DATA)0)->NetLogonTotal
  329. }
  330. };
  331.