The Gaudi Framework  v30r3 (a5ef0a68)
ProcessDescriptor.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_PROCESS_H
2 #define GAUDIKERNEL_PROCESS_H
3 
4 // Framework include files
5 #include "GaudiKernel/Kernel.h"
7 
8 namespace System
9 {
10  // Forward declarations
11  class ProcessDescriptor;
13  ProcessDescriptor* getProcess();
14 
18  typedef struct _PEB* PPEB;
20  long ExitStatus;
22  unsigned long AffinityMask;
24  unsigned long UniqueProcessId;
26  };
27 
33  struct QUOTA_LIMITS {
34  unsigned long PagedPoolLimit;
35  unsigned long NonPagedPoolLimit;
36  unsigned long MinimumWorkingSetSize;
37  unsigned long MaximumWorkingSetSize;
38  unsigned long PagefileLimit;
40  };
41 
45  struct IO_COUNTERS {
46  unsigned long ReadOperationCount;
47  unsigned long WriteOperationCount;
48  unsigned long OtherOperationCount;
49  // longlong ReadOperationCount;
50  // longlong WriteOperationCount;
51  // longlong OtherOperationCount;
55  };
56 
60  struct VM_COUNTERS {
61  unsigned long PeakVirtualSize;
62  unsigned long VirtualSize;
63  unsigned long PageFaultCount;
64  unsigned long PeakWorkingSetSize;
65  unsigned long WorkingSetSize;
66  unsigned long QuotaPeakPagedPoolUsage;
67  unsigned long QuotaPagedPoolUsage;
69  unsigned long QuotaNonPagedPoolUsage;
70  unsigned long PagefileUsage;
71  unsigned long PeakPagefileUsage;
72  };
73 
78  unsigned long PeakPagedPoolUsage;
79  unsigned long PagedPoolUsage;
80  unsigned long PagedPoolLimit;
81  unsigned long PeakNonPagedPoolUsage;
82  unsigned long NonPagedPoolUsage;
83  unsigned long NonPagedPoolLimit;
84  unsigned long PeakPagefileUsage;
85  unsigned long PagefileUsage;
86  unsigned long PagefileLimit;
87  };
88 
98  // longlong EllapsedTime; // Added by M.Frank
99  };
100 
110  {
112  {
113  void* m_handle;
115 
116  public:
117  ProcessHandle( long pid );
118  virtual ~ProcessHandle();
119  long item() { return m_needRelease ? 1 : 0; }
120  void* handle() { return m_handle; }
121  };
122 
123  public:
125  virtual ~ProcessDescriptor();
126  long query( long pid, InfoType info, PROCESS_BASIC_INFORMATION* buffer );
127  long query( long pid, InfoType info, POOLED_USAGE_AND_LIMITS* buffer );
128  long query( long pid, InfoType info, KERNEL_USER_TIMES* buffer );
129  long query( long pid, InfoType info, QUOTA_LIMITS* buffer );
130  long query( long pid, InfoType info, VM_COUNTERS* buffer );
131  long query( long pid, InfoType info, IO_COUNTERS* buffer );
132  long query( long pid, InfoType info, long* buffer );
133  };
134 
136  {
137  static ProcessDescriptor p;
138  return &p;
139  }
140 }
141 #endif // GAUDIKERNEL_PROCESS_H
unsigned long QuotaPeakPagedPoolUsage
unsigned long PagefileUsage
Process/Thread System and User Time NtQueryInformationProcess using ProcessTimes NtQueryInformationTh...
unsigned long MaximumWorkingSetSize
Note: OS specific details for environment resolution.
Definition: Debugger.h:19
unsigned long PeakPagefileUsage
Process I/O Counters NtQueryInformationProcess using ProcessIoCounters.
unsigned long PagefileLimit
unsigned long WorkingSetSize
unsigned long NonPagedPoolLimit
unsigned long PeakWorkingSetSize
unsigned long VirtualSize
unsigned long OtherOperationCount
unsigned long PageFaultCount
unsigned long QuotaNonPagedPoolUsage
unsigned long ReadOperationCount
unsigned long PeakVirtualSize
ProcessDescriptor * getProcess()
Retrieve Process structure.
Process Quotas NtQueryInformationProcess using ProcessQuotaLimits NtQueryInformationProcess using Pro...
struct _PEB * PPEB
Basic Process Information NtQueryInformationProcess using ProcessBasicInfo.
Provides access to process information.
Process Virtual Memory Counters NtQueryInformationProcess using ProcessVmCounters.
unsigned long PagedPoolLimit
Process Pooled Quota Usage and Limits NtQueryInformationProcess using ProcessPooledUsageAndLimits.
unsigned long MinimumWorkingSetSize
unsigned long WriteOperationCount
unsigned long QuotaPeakNonPagedPoolUsage
InfoType
Enumeration for fetching information.
Definition: SystemBase.h:19
void * ProcessHandle
Definition of the process handle.
Definition: ModuleInfo.h:33
unsigned long QuotaPagedPoolUsage