00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef __RM_ProcessMonitor_h__
00043 #define __RM_ProcessMonitor_h__
00044
00045 #ifdef __cplusplus
00046
00055 namespace ProcessMonitor
00056 {
00057 #endif // __cplusplus
00058
00059 #define RM_PROCESS_UUID_STRING "09d5fc35-b13d-4cf0-9e02-d655255f9aca"
00060
00061
00062
00063
00064 #ifdef RM_USING_WIDE_CHARS
00065 #define RM_PROCESS_NAME L"ProcessMonitor"
00066 #define RM_PROCESS_DESCRIPTION L"ProcessMonitor is a resource monitor subsystem that \
00067 provides access to statistics about a running processes. \
00068 Each running process is a resource and the statistics \
00069 are obtain from /proc/pid/[fd|stat|statm]"
00070
00071 #define RM_PROCESS_RESOURCE_NAME L"ProcessMonitorPid"
00072 #define RM_PROCESS_RESOURCE_DESCRIPTION L"A ProcessMonitor resource is a process. \
00073 A valid pid of a running process is used as the resource id when creating a monitor \
00074 or accessing the value of a process statistic."
00075
00076 #define CPU_putime_NAME L"percent user mode time"
00077 #define CPU_putime_DESCRIPTION L"The percentage of time that this process has been scheduled in user mode.\
00078 It is the percentage of accummulated user mode time over the last 10 readings."
00079 #define CPU_putime_UNITS L"percent"
00080
00081 #define CPU_pstime_NAME L"percent system mode time"
00082 #define CPU_pstime_DESCRIPTION L"The percentage of time that this process has been scheduled in kernel mode.\
00083 It is the percentage of accummulated kernel mode time over the last 10 readings."
00084 #define CPU_pstime_UNITS L"percent"
00085
00086 #define CPU_ptime_NAME L"percent CPU time"
00087 #define CPU_ptime_DESCRIPTION L"The percentage of time that this process has been scheduled in user and kernel mode.\
00088 It is the percentage of accummulated user plus system mode time over the last 10 readings."
00089 #define CPU_ptime_UNITS L"percent"
00090
00091 #define FD_fds_NAME L"open files"
00092 #define FD_fds_DESCRIPTION L"Current number of open files as reported in the /proc/pid/fd directory"
00093 #define FD_fds_UNITS L"file descriptors"
00094
00095 #define STAT_minflt_NAME L"minor faults"
00096 #define STAT_minflt_DESCRIPTION L"The number of minor faults the process has made, those which have not required loading a memory page from disk."
00097 #define STAT_minflt_UNITS L"faults"
00098
00099 #define STAT_cminflt_NAME L"children minor faults"
00100 #define STAT_cminflt_DESCRIPTION L"The number of minor faults that the process and its children have made."
00101 #define STAT_cminflt_UNITS L"faults"
00102
00103 #define STAT_majflt_NAME L"major fault"
00104 #define STAT_majflt_DESCRIPTION L"The number of major faults the process has made, those which have required loading a memory page from disk."
00105 #define STAT_majflt_UNITS L"faults"
00106
00107 #define STAT_cmajflt_NAME L"children major faults"
00108 #define STAT_cmajflt_DESCRIPTION L"The number of major faults that the process and its children have made."
00109 #define STAT_cmajflt_UNITS L"faults"
00110
00111 #define STAT_utime_NAME L"user mode time"
00112 #define STAT_utime_DESCRIPTION L"The number of jiffies that this process has been scheduled in user mode."
00113 #define STAT_utime_UNITS L"jiffies"
00114
00115 #define STAT_stime_NAME L"system mode time"
00116 #define STAT_stime_DESCRIPTION L"The number of jiffies that this process has been scheduled in kernel mode."
00117 #define STAT_stime_UNITS L"jiffies"
00118
00119 #define STAT_cutime_NAME L"children user mode time"
00120 #define STAT_cutime_DESCRIPTION L"The number of jiffies that this process and its children have been scheduled in user mode."
00121 #define STAT_cutime_UNITS L"jiffies"
00122
00123 #define STAT_cstime_NAME L"children system mode time"
00124 #define STAT_cstime_DESCRIPTION L"The number of jiffies that this process and its children have been scheduled in kernel mode."
00125 #define STAT_cstime_UNITS L"jiffies"
00126
00127 #define STAT_counter_NAME L"current timeslice"
00128 #define STAT_counter_DESCRIPTION L"The current maximum size in jiffies of the process's next timeslice, or what is currently left of its current timeslice, if it is the currently running process."
00129 #define STAT_counter_UNITS L"jiffies"
00130
00131 #define STAT_priority_NAME L"priority"
00132 #define STAT_priority_DESCRIPTION L"The standard nice value, plus fifteen. The value is never negative in the kernel."
00133 #define STAT_priority_UNITS L""
00134
00135 #define STAT_timeout_NAME L"next timeout"
00136 #define STAT_timeout_DESCRIPTION L"The time in jiffies of the process's next timeout."
00137 #define STAT_timeout_UNITS L"jiffies"
00138
00139 #define STAT_itrealvalue_NAME L"next SIGALRM"
00140 #define STAT_itrealvalue_DESCRIPTION L"The time (in jiffies) before the next SIGALRM is sent to the process due to an interval timer."
00141 #define STAT_itrealvalue_UNITS L"jiffies"
00142
00143 #define STAT_starttime_NAME L"start time"
00144 #define STAT_starttime_DESCRIPTION L"Time the process started in jiffies after system boot."
00145 #define STAT_starttime_UNITS L"jiffies"
00146
00147 #define STAT_vsize_NAME L"virtual memory size"
00148 #define STAT_vsize_DESCRIPTION L"Virtual memory size."
00149 #define STAT_vsize_UNITS L"bytes"
00150
00151 #define STAT_rss_NAME L"resident set size"
00152 #define STAT_rss_DESCRIPTION L"Resident Set Size: number of pages the process has in real memory, minus 3 for administrative purposes. This is just the pages which count towards text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out."
00153 #define STAT_rss_UNITS L"pages"
00154
00155 #define STAT_rlim_NAME L"resident set limit"
00156 #define STAT_rlim_DESCRIPTION L"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
00157 #define STAT_rlim_UNITS L"bytes"
00158
00159 #define STATM_size_NAME L"total program size"
00160 #define STATM_size_DESCRIPTION L"total program size in pages"
00161 #define STATM_size_UNITS L"pages"
00162
00163 #define STATM_resident_NAME L"resident size"
00164 #define STATM_resident_DESCRIPTION L"resident size of memory portions in pages"
00165 #define STATM_resident_UNITS L"pages"
00166
00167 #define STATM_shared_NAME L"shared size"
00168 #define STATM_shared_DESCRIPTION L"number of pages that are shared"
00169 #define STATM_shared_UNITS L"pages"
00170
00171 #define STATM_trs_NAME L"code size"
00172 #define STATM_trs_DESCRIPTION L"number of pages that are 'code'"
00173 #define STATM_trs_UNITS L"pages"
00174
00175 #define STATM_drs_NAME L"data size"
00176 #define STATM_drs_DESCRIPTION L"number of pages of data/stack"
00177 #define STATM_drs_UNITS L"pages"
00178
00179 #define STATM_lrs_NAME L"library size"
00180 #define STATM_lrs_DESCRIPTION L"number of pages of library"
00181 #define STATM_lrs_UNITS L"pages"
00182
00183 #define STATM_dt_NAME L"dirty size"
00184 #define STATM_dt_DESCRIPTION L"number of dirty pages"
00185 #define STATM_dt_UNITS L"pages"
00186
00187 #ifdef InlineProcessMonitor
00188 #define RM_PROCESS__MONITOR_NAME L"Sample Inline Monitor"
00189 #define RM_PROCESS__MONITOR_DESCRIPTION L"Sample Inline Monitor - for demonstration purposes only"
00190 #endif //InlineProcessMonitor
00191
00192 #else // RM_USING_WIDE_CHARS
00193
00194 #define RM_PROCESS_NAME "ProcessMonitor"
00195 #define RM_PROCESS_DESCRIPTION "ProcessMonitor is a resource monitor subsystem that \
00196 provides access to statistics about a running processes. \
00197 Each running process is a resource and the statistics \
00198 are obtain from /proc/pid/[fd|stat|statm]"
00199
00200 #define RM_PROCESS_RESOURCE_NAME "ProcessMonitorPid"
00201 #define RM_PROCESS_RESOURCE_DESCRIPTION "A ProcessMonitor resource is a process. \
00202 A valid pid of a running process is used as the resource id when creating a monitor \
00203 or accessing the value of a process statistic."
00204
00205 #define CPU_putime_NAME "percent user mode time"
00206 #define CPU_putime_DESCRIPTION "The percentage of time that this process has been scheduled in user mode.\
00207 It is the percentage of accummulated user mode time over the last 10 readings."
00208 #define CPU_putime_UNITS "percent"
00209
00210 #define CPU_pstime_NAME "percent system mode time"
00211 #define CPU_pstime_DESCRIPTION "The percentage of time that this process has been scheduled in kernel mode.\
00212 It is the percentage of accummulated kernel mode time over the last 10 readings."
00213 #define CPU_pstime_UNITS "percent"
00214
00215 #define CPU_ptime_NAME "percent CPU time"
00216 #define CPU_ptime_DESCRIPTION "The percentage of time that this process has been scheduled in user and kernel mode.\
00217 It is the percentage of accummulated user plus system mode time over the last 10 readings."
00218 #define CPU_ptime_UNITS "percent"
00219
00220 #define FD_fds_NAME "open files"
00221 #define FD_fds_DESCRIPTION "Current number of open files as reported in the /proc/pid/fd directory"
00222 #define FD_fds_UNITS "file descriptors"
00223
00224 #define STAT_minflt_NAME "minor faults"
00225 #define STAT_minflt_DESCRIPTION "The number of minor faults the process has made, those which have not required loading a memory page from disk."
00226 #define STAT_minflt_UNITS "faults"
00227
00228 #define STAT_cminflt_NAME "children minor faults"
00229 #define STAT_cminflt_DESCRIPTION "The number of minor faults that the process and its children have made."
00230 #define STAT_cminflt_UNITS "faults"
00231
00232 #define STAT_majflt_NAME "major fault"
00233 #define STAT_majflt_DESCRIPTION "The number of major faults the process has made, those which have required loading a memory page from disk."
00234 #define STAT_majflt_UNITS "faults"
00235
00236 #define STAT_cmajflt_NAME "children major faults"
00237 #define STAT_cmajflt_DESCRIPTION "The number of major faults that the process and its children have made."
00238 #define STAT_cmajflt_UNITS "faults"
00239
00240 #define STAT_utime_NAME "user mode time"
00241 #define STAT_utime_DESCRIPTION "The number of jiffies that this process has been scheduled in user mode."
00242 #define STAT_utime_UNITS "jiffies"
00243
00244 #define STAT_stime_NAME "system mode time"
00245 #define STAT_stime_DESCRIPTION "The number of jiffies that this process has been scheduled in kernel mode."
00246 #define STAT_stime_UNITS "jiffies"
00247
00248 #define STAT_cutime_NAME "children user mode time"
00249 #define STAT_cutime_DESCRIPTION "The number of jiffies that this process and its children have been scheduled in user mode."
00250 #define STAT_cutime_UNITS "jiffies"
00251
00252 #define STAT_cstime_NAME "children system mode time"
00253 #define STAT_cstime_DESCRIPTION "The number of jiffies that this process and its children have been scheduled in kernel mode."
00254 #define STAT_cstime_UNITS "jiffies"
00255
00256 #define STAT_counter_NAME "current timeslice"
00257 #define STAT_counter_DESCRIPTION "The current maximum size in jiffies of the process's next timeslice, or what is currently left of its current timeslice, if it is the currently running process."
00258 #define STAT_counter_UNITS "jiffies"
00259
00260 #define STAT_priority_NAME "priority"
00261 #define STAT_priority_DESCRIPTION "The standard nice value, plus fifteen. The value is never negative in the kernel."
00262 #define STAT_priority_UNITS ""
00263
00264 #define STAT_timeout_NAME "next timeout"
00265 #define STAT_timeout_DESCRIPTION "The time in jiffies of the process's next timeout."
00266 #define STAT_timeout_UNITS "jiffies"
00267
00268 #define STAT_itrealvalue_NAME "next SIGARM"
00269 #define STAT_itrealvalue_DESCRIPTION "The time (in jiffies) before the next SIGARM is sent to the process due to an interval timer."
00270 #define STAT_itrealvalue_UNITS "jiffies"
00271
00272 #define STAT_starttime_NAME "start time"
00273 #define STAT_starttime_DESCRIPTION "Time the process started in jiffies after system boot."
00274 #define STAT_starttime_UNITS "jiffies"
00275
00276 #define STAT_vsize_NAME "virtual memory size"
00277 #define STAT_vsize_DESCRIPTION "Virtual memory size."
00278 #define STAT_vsize_UNITS "bytes"
00279
00280 #define STAT_rss_NAME "resident set size"
00281 #define STAT_rss_DESCRIPTION "Resident Set Size: number of pages the process has in real memory, minus 3 for administrative purposes. This is just the pages which count towards text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out."
00282 #define STAT_rss_UNITS "pages"
00283
00284 #define STAT_rlim_NAME "resident set limit"
00285 #define STAT_rlim_DESCRIPTION "Current limit in bytes on the rss of the process (usually 2,147,483,647)."
00286 #define STAT_rlim_UNITS "bytes"
00287
00288 #define STATM_size_NAME "total program size"
00289 #define STATM_size_DESCRIPTION "total program size in pages"
00290 #define STATM_size_UNITS "pages"
00291
00292 #define STATM_resident_NAME "resident size"
00293 #define STATM_resident_DESCRIPTION "resident size of memory portions in pages"
00294 #define STATM_resident_UNITS "pages"
00295
00296 #define STATM_shared_NAME "shared size"
00297 #define STATM_shared_DESCRIPTION "number of pages that are shared"
00298 #define STATM_shared_UNITS "pages"
00299
00300 #define STATM_trs_NAME "code size"
00301 #define STATM_trs_DESCRIPTION "number of pages that are 'code'"
00302 #define STATM_trs_UNITS "pages"
00303
00304 #define STATM_drs_NAME "data size"
00305 #define STATM_drs_DESCRIPTION "number of pages of data/stack"
00306 #define STATM_drs_UNITS "pages"
00307
00308 #define STATM_lrs_NAME "library size"
00309 #define STATM_lrs_DESCRIPTION "number of pages of library"
00310 #define STATM_lrs_UNITS "pages"
00311
00312 #define STATM_dt_NAME "dirty size"
00313 #define STATM_dt_DESCRIPTION "number of dirty pages"
00314 #define STATM_dt_UNITS "pages"
00315
00316 #ifdef InlineProcessMonitor
00317 #define RM_PROCESS__MONITOR_NAME "Sample Inline Monitor"
00318 #define RM_PROCESS__MONITOR_DESCRIPTION "Sample Inline Monitor - for demonstration purposes only"
00319 #endif //InlineProcessMonitor
00320
00321 #endif // RM_USING_WIDE_CHARS
00322
00323 #define CPU_putime_ID 60
00324 #define CPU_putime_TYPE rmGauge
00325 #define CPU_putime_SIZE rmSizeU32
00326 #define CPU_putime_SCALE rmScaleNone
00327 #define CPU_pstime_ID 61
00328 #define CPU_pstime_TYPE rmGauge
00329 #define CPU_pstime_SIZE rmSizeU32
00330 #define CPU_pstime_SCALE rmScaleNone
00331 #define CPU_ptime_ID 62
00332 #define CPU_ptime_TYPE rmGauge
00333 #define CPU_ptime_SIZE rmSizeU32
00334 #define CPU_ptime_SCALE rmScaleNone
00335 #define FD_fds_ID 80
00336 #define FD_fds_TYPE rmGauge
00337 #define FD_fds_SIZE rmSizeU32
00338 #define FD_fds_SCALE rmScaleNone
00339 #define STAT_minflt_ID 100
00340 #define STAT_minflt_TYPE rmCounter
00341 #define STAT_minflt_SIZE rmSizeU32
00342 #define STAT_minflt_SCALE rmScaleNone
00343 #define STAT_cminflt_ID 101
00344 #define STAT_cminflt_TYPE rmCounter
00345 #define STAT_cminflt_SIZE rmSizeU32
00346 #define STAT_cminflt_SCALE rmScaleNone
00347 #define STAT_majflt_ID 102
00348 #define STAT_majflt_TYPE rmCounter
00349 #define STAT_majflt_SIZE rmSizeU32
00350 #define STAT_majflt_SCALE rmScaleNone
00351 #define STAT_cmajflt_ID 103
00352 #define STAT_cmajflt_TYPE rmCounter
00353 #define STAT_cmajflt_SIZE rmSizeU32
00354 #define STAT_cmajflt_SCALE rmScaleNone
00355 #define STAT_utime_ID 104
00356 #define STAT_utime_TYPE rmCounter
00357 #define STAT_utime_SIZE rmSizeU32
00358 #define STAT_utime_SCALE rmScaleJiffies
00359 #define STAT_stime_ID 105
00360 #define STAT_stime_TYPE rmCounter
00361 #define STAT_stime_SIZE rmSizeU32
00362 #define STAT_stime_SCALE rmScaleJiffies
00363 #define STAT_cutime_ID 106
00364 #define STAT_cutime_TYPE rmCounter
00365 #define STAT_cutime_SIZE rmSizeU32
00366 #define STAT_cutime_SCALE rmScaleJiffies
00367 #define STAT_cstime_ID 107
00368 #define STAT_cstime_TYPE rmCounter
00369 #define STAT_cstime_SIZE rmSizeU32
00370 #define STAT_cstime_SCALE rmScaleJiffies
00371 #define STAT_counter_ID 108
00372 #define STAT_counter_TYPE rmGauge
00373 #define STAT_counter_SIZE rmSizeU32
00374 #define STAT_counter_SCALE rmScaleJiffies
00375 #define STAT_priority_ID 109
00376 #define STAT_priority_TYPE rmGauge
00377 #define STAT_priority_SIZE rmSizeU32
00378 #define STAT_priority_SCALE rmScaleNone
00379 #define STAT_timeout_ID 110
00380 #define STAT_timeout_TYPE rmGauge
00381 #define STAT_timeout_SIZE rmSizeU32
00382 #define STAT_timeout_SCALE rmScaleJiffies
00383 #define STAT_itrealvalue_ID 111
00384 #define STAT_itrealvalue_TYPE rmGauge
00385 #define STAT_itrealvalue_SIZE rmSizeU32
00386 #define STAT_itrealvalue_SCALE rmScaleJiffies
00387 #define STAT_starttime_ID 112
00388 #define STAT_starttime_TYPE rmCounter
00389 #define STAT_starttime_SIZE rmSizeU32
00390 #define STAT_starttime_SCALE rmScaleJiffies
00391 #define STAT_vsize_ID 113
00392 #define STAT_vsize_TYPE rmGauge
00393 #define STAT_vsize_SIZE rmSizeU32
00394 #define STAT_vsize_SCALE rmScaleByte
00395 #define STAT_rss_ID 114
00396 #define STAT_rss_TYPE rmGauge
00397 #define STAT_rss_SIZE rmSizeU32
00398 #define STAT_rss_SCALE rmScalePages
00399 #define STAT_rlim_ID 115
00400 #define STAT_rlim_TYPE rmCounter
00401 #define STAT_rlim_SIZE rmSizeU32
00402 #define STAT_rlim_SCALE rmScaleByte
00403 #define STATM_size_ID 150
00404 #define STATM_size_TYPE rmGauge
00405 #define STATM_size_SIZE rmSizeU32
00406 #define STATM_size_SCALE rmScalePages
00407 #define STATM_resident_ID 151
00408 #define STATM_resident_TYPE rmGauge
00409 #define STATM_resident_SIZE rmSizeU32
00410 #define STATM_resident_SCALE rmScalePages
00411 #define STATM_shared_ID 152
00412 #define STATM_shared_TYPE rmGauge
00413 #define STATM_shared_SIZE rmSizeU32
00414 #define STATM_shared_SCALE rmScalePages
00415 #define STATM_trs_ID 153
00416 #define STATM_trs_TYPE rmGauge
00417 #define STATM_trs_SIZE rmSizeU32
00418 #define STATM_trs_SCALE rmScalePages
00419 #define STATM_drs_ID 154
00420 #define STATM_drs_TYPE rmGauge
00421 #define STATM_drs_SIZE rmSizeU32
00422 #define STATM_drs_SCALE rmScalePages
00423 #define STATM_lrs_ID 155
00424 #define STATM_lrs_TYPE rmGauge
00425 #define STATM_lrs_SIZE rmSizeU32
00426 #define STATM_lrs_SCALE rmScalePages
00427 #define STATM_dt_ID 156
00428 #define STATM_dt_TYPE rmGauge
00429 #define STATM_dt_SIZE rmSizeU32
00430 #define STATM_dt_SCALE rmScalePages
00431
00432 #ifdef __cplusplus
00433 };
00434 #endif
00435 #endif // __RM_ProcessMonitor_h__