6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
31 typedef struct _PERFDATA
33 WCHAR ImageName
[MAX_PATH
];
35 WCHAR UserName
[MAX_PATH
];
38 LARGE_INTEGER CPUTime
;
39 ULONG WorkingSetSizeBytes
;
40 ULONG PeakWorkingSetSizeBytes
;
41 ULONG WorkingSetSizeDelta
;
43 ULONG PageFaultCountDelta
;
44 ULONG VirtualMemorySizeBytes
;
45 ULONG PagedPoolUsagePages
;
46 ULONG NonPagedPoolUsagePages
;
50 ULONG USERObjectCount
;
52 IO_COUNTERS IOCounters
;
54 LARGE_INTEGER UserTime
;
55 LARGE_INTEGER KernelTime
;
56 } PERFDATA
, *PPERFDATA
;
58 typedef struct _CMD_LINE_CACHE
63 struct _CMD_LINE_CACHE
* pnext
;
64 } CMD_LINE_CACHE
, *PCMD_LINE_CACHE
;
66 BOOL
PerfDataInitialize(void);
67 void PerfDataUninitialize(void);
68 void PerfDataRefresh(void);
70 BOOL
PerfDataGet(ULONG Index
, PPERFDATA
*lppData
);
71 ULONG
PerfDataGetProcessIndex(ULONG pid
);
72 ULONG
PerfDataGetProcessCount(void);
73 ULONG
PerfDataGetProcessorUsage(void);
74 ULONG
PerfDataGetProcessorSystemUsage(void);
76 BOOL
PerfDataGetImageName(ULONG Index
, LPWSTR lpImageName
, ULONG nMaxCount
);
77 ULONG
PerfDataGetProcessId(ULONG Index
);
78 BOOL
PerfDataGetUserName(ULONG Index
, LPWSTR lpUserName
, ULONG nMaxCount
);
80 BOOL
PerfDataGetCommandLine(ULONG Index
, LPWSTR lpCommandLine
, ULONG nMaxCount
);
81 void PerfDataDeallocCommandLineCache();
83 ULONG
PerfDataGetSessionId(ULONG Index
);
84 ULONG
PerfDataGetCPUUsage(ULONG Index
);
85 LARGE_INTEGER
PerfDataGetCPUTime(ULONG Index
);
86 ULONG
PerfDataGetWorkingSetSizeBytes(ULONG Index
);
87 ULONG
PerfDataGetPeakWorkingSetSizeBytes(ULONG Index
);
88 ULONG
PerfDataGetWorkingSetSizeDelta(ULONG Index
);
89 ULONG
PerfDataGetPageFaultCount(ULONG Index
);
90 ULONG
PerfDataGetPageFaultCountDelta(ULONG Index
);
91 ULONG
PerfDataGetVirtualMemorySizeBytes(ULONG Index
);
92 ULONG
PerfDataGetPagedPoolUsagePages(ULONG Index
);
93 ULONG
PerfDataGetNonPagedPoolUsagePages(ULONG Index
);
94 ULONG
PerfDataGetBasePriority(ULONG Index
);
95 ULONG
PerfDataGetHandleCount(ULONG Index
);
96 ULONG
PerfDataGetThreadCount(ULONG Index
);
97 ULONG
PerfDataGetUSERObjectCount(ULONG Index
);
98 ULONG
PerfDataGetGDIObjectCount(ULONG Index
);
99 BOOL
PerfDataGetIOCounters(ULONG Index
, PIO_COUNTERS pIoCounters
);
101 ULONG
PerfDataGetCommitChargeTotalK(void);
102 ULONG
PerfDataGetCommitChargeLimitK(void);
103 ULONG
PerfDataGetCommitChargePeakK(void);
105 ULONG
PerfDataGetKernelMemoryTotalK(void);
106 ULONG
PerfDataGetKernelMemoryPagedK(void);
107 ULONG
PerfDataGetKernelMemoryNonPagedK(void);
109 ULONG
PerfDataGetPhysicalMemoryTotalK(void);
110 ULONG
PerfDataGetPhysicalMemoryAvailableK(void);
111 ULONG
PerfDataGetPhysicalMemorySystemCacheK(void);
113 ULONG
PerfDataGetSystemHandleCount(void);
115 ULONG
PerfDataGetTotalThreadCount(void);