关于内存的绝大多数信息可以通过以下函数获得:BOOL GetProcessMemoryInfo( HANDLE Process, // handle to process PPROCESS_MEMORY_COUNTERS ppsmemCounters, // buffer DWORD cb // size of buffer );The GetProcessMemoryInfo function retrieves information about the memory usage of the specified process in the PROCESS_MEMORY_COUNTERS structure.typedef struct _PROCESS_MEMORY_COUNTERS { DWORD cb; DWORD PageFaultCount; SIZE_T PeakWorkingSetSize; SIZE_T WorkingSetSize; SIZE_T QuotaPeakPagedPoolUsage; SIZE_T QuotaPagedPoolUsage; SIZE_T QuotaPeakNonPagedPoolUsage; SIZE_T QuotaNonPagedPoolUsage; SIZE_T PagefileUsage; SIZE_T PeakPagefileUsage; } PROCESS_MEMORY_COUNTERS; typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
获得cpu时间: BOOL GetProcessTimes( HANDLE hProcess, // handle to process LPFILETIME lpCreationTime, // process creation time LPFILETIME lpExitTime, // process exit time LPFILETIME lpKernelTime, // process kernel-mode time LPFILETIME lpUserTime // process user-mode time );关于io信息: BOOL GetProcessIoCounters( HANDLE hProcess, // handle to process PIO_COUNTERS lpIoCounters // I/O accouting information );
GetSystemInfo取得与底层硬件平台有关的信息
可以看看这里的一些api
http://www.dapha.net/api/
硬件与系统函数里面
HANDLE Process, // handle to process
PPROCESS_MEMORY_COUNTERS ppsmemCounters, // buffer
DWORD cb // size of buffer
);The GetProcessMemoryInfo function retrieves information about the memory usage of the specified process in the PROCESS_MEMORY_COUNTERS structure.typedef struct _PROCESS_MEMORY_COUNTERS {
DWORD cb;
DWORD PageFaultCount;
SIZE_T PeakWorkingSetSize;
SIZE_T WorkingSetSize;
SIZE_T QuotaPeakPagedPoolUsage;
SIZE_T QuotaPagedPoolUsage;
SIZE_T QuotaPeakNonPagedPoolUsage;
SIZE_T QuotaNonPagedPoolUsage;
SIZE_T PagefileUsage;
SIZE_T PeakPagefileUsage;
} PROCESS_MEMORY_COUNTERS;
typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
BOOL GetProcessTimes(
HANDLE hProcess, // handle to process
LPFILETIME lpCreationTime, // process creation time
LPFILETIME lpExitTime, // process exit time
LPFILETIME lpKernelTime, // process kernel-mode time
LPFILETIME lpUserTime // process user-mode time
);关于io信息:
BOOL GetProcessIoCounters(
HANDLE hProcess, // handle to process
PIO_COUNTERS lpIoCounters // I/O accouting information
);
http://expert.csdn.net/Expert/topic/2319/2319630.xml?temp=.694729
http://expert.csdn.net/Expert/topic/2309/2309423.xml?temp=.0920679