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 #ifndef __RM_KernelMonitor_h__
00041 #define __RM_KernelMonitor_h__
00042
00043 #ifdef __cplusplus
00044
00053 namespace KernelMonitor
00054 {
00055 #endif // __cplusplus
00056
00057 #define RM_KERNEL_UUID_STRING "f05d2371-d0d5-4cf9-866e-0c8e92afde66"
00058
00059
00060
00061
00062 #ifdef RM_USING_WIDE_CHARS
00063
00064 #define KL_SUBSYSTEM_NAME L"kernel subsystem"
00065 #define KL_SUBSYSTEM_DESCR L"resource monitor kernel subsystem for kernel version 2.4.x"
00066
00067 #define KL_RESOURCE_NAME L"kernel resource"
00068 #define KL_RESOURCE_DESCR L"kernel subsystem has one resource"
00069
00070
00071
00072 #define KL_STAT_PHYSICAL_MEM_NAME L"physical memory"
00073 #define KL_STAT_PHYSICAL_MEM_DESCR L"Current value is free physical memory. The upper bound is total physical memory."
00074 #define KL_STAT_PHYSICAL_MEM_UNIT L"byte"
00075
00076 #define KL_STAT_VIRTUAL_MEM_NAME L"virtual memory"
00077 #define KL_STAT_VIRTUAL_MEM_DESCR L"Current value is free virtual memory. The upper bound is the total virtual memory "
00078 #define KL_STAT_VIRTUAL_MEM_UNIT L"byte"
00079
00080 #define KL_STAT_ALLOCATED_KL_MEM_NAME L"allocated kernel memory"
00081 #define KL_STAT_ALLOCATED_KL_MEM_DESCR L"the maximum size of a shared memory segment for kernel"
00082 #define KL_STAT_ALLOCATED_KL_MEM_UNIT L"byte"
00083
00084 #define KL_STAT_ACTIVE_PROC_NAME L"active processes"
00085 #define KL_STAT_ACTIVE_PROC_DESCR L"the number of processes that currently running"
00086 #define KL_STAT_ACTIVE_PROC_UNIT L"none"
00087
00088 #define KL_STAT_OPEN_FILE_NAME L"open file descriptors"
00089 #define KL_STAT_OPEN_FILE_DESCR L"Current value is the number of used file handles. The upper bound is the max number of file descriptiors the system allows"
00090 #define KL_STAT_OPEN_FILE_UNIT L"none"
00091
00092 #define KL_STAT_CPU_KERNEL_NAME L"cpu kernel utilization"
00093 #define KL_STAT_CPU_KERNEL_DESCR L"Average cpu utilization in kernel space within last 30 seconds"
00094 #define KL_STAT_CPU_KERNEL_UNIT L"none"
00095
00096 #define KL_STAT_USER_KERNEL_NAME L"cpu user utilization"
00097 #define KL_STAT_USER_KERNEL_DESCR L"average cpu utilization in user space within last 30 seconds"
00098 #define KL_STAT_USER_KERNEL_UNIT L"none"
00099
00100 #define KL_STAT_INODE_USAGE_NAME L"inode usage"
00101 #define KL_STAT_INODE_USAGE_DESCR L"the number of inodes the system has allocated. the upper bound is the max number of inode the system allows"
00102 #define KL_STAT_INODE_USAGE_UNIT L"none"
00103
00104 #else // RM_USING_WIDE_CHARS
00105
00106 #define KL_SUBSYSTEM_NAME "kernel subsystem"
00107 #define KL_SUBSYSTEM_DESCR "resource monitor kernel subsystem for kernel version 2.4.x"
00108
00109 #define KL_RESOURCE_NAME "kernel resource"
00110 #define KL_RESOURCE_DESCR "kernel subsystem has one resource"
00111
00112
00113 #define KL_STAT_PHYSICAL_MEM_NAME "physical memory"
00114 #define KL_STAT_PHYSICAL_MEM_DESCR "Current value is free physical memory. The upper bound is total physical memory."
00115 #define KL_STAT_PHYSICAL_MEM_UNIT "byte"
00116
00117 #define KL_STAT_VIRTUAL_MEM_NAME "virtual memory"
00118 #define KL_STAT_VIRTUAL_MEM_DESCR "Current value is free virtual memory. The upper bound is the total virtual memory "
00119 #define KL_STAT_VIRTUAL_MEM_UNIT "byte"
00120
00121 #define KL_STAT_ALLOCATED_KL_MEM_NAME "allocated kernel memory"
00122 #define KL_STAT_ALLOCATED_KL_MEM_DESCR "the maximum size of a shared memory segment for kernel"
00123 #define KL_STAT_ALLOCATED_KL_MEM_UNIT "byte"
00124
00125 #define KL_STAT_ACTIVE_PROC_NAME "active processes"
00126 #define KL_STAT_ACTIVE_PROC_DESCR "the number of processes that currently running"
00127 #define KL_STAT_ACTIVE_PROC_UNIT "none"
00128
00129 #define KL_STAT_OPEN_FILE_NAME "open file descriptors"
00130 #define KL_STAT_OPEN_FILE_DESCR "Current value is the number of used file handles. The upper bound is the max number of file descriptiors the system allows"
00131 #define KL_STAT_OPEN_FILE_UNIT "none"
00132
00133 #define KL_STAT_CPU_KERNEL_NAME "cpu kernel utilization"
00134 #define KL_STAT_CPU_KERNEL_DESCR "Average cpu utilization in kernel space"
00135 #define KL_STAT_CPU_KERNEL_UNIT "none"
00136
00137 #define KL_STAT_USER_KERNEL_NAME "cpu user utilization"
00138 #define KL_STAT_USER_KERNEL_DESCR "average cpu utilization in user space"
00139 #define KL_STAT_USER_KERNEL_UNIT "none"
00140
00141 #define KL_STAT_INODE_USAGE_NAME "inode usage"
00142 #define KL_STAT_INODE_USAGE_DESCR "the number of inodes the system has allocated. the upper bound is the max number of inode the system allows"
00143 #define KL_STAT_INODE_USAGE_UNIT "none"
00144
00145
00146 #endif // RM_USING_WIDE_CHARS
00147
00148 #define KL_STAT_AVAILABLE_PHYSICAL_MEM 0
00149 #define KL_TYPE_AVAILABLE_PHYSICAL_MEM rmGauge
00150 #define KL_SIZE_AVAILABLE_PHYSICAL_MEM rmSizeU32
00151 #define KL_SCALE_AVAILABLE_PHYSICAL_MEM rmScaleByte
00152
00153 #define KL_STAT_AVAILABLE_VIRTUAL_MEM 1
00154 #define KL_TYPE_AVAILABLE_VIRTUAL_MEM rmGauge
00155 #define KL_SIZE_AVAILABLE_VIRTUAL_MEM rmSizeU32
00156 #define KL_SCALE_AVAILABLE_VIRTUAL_MEM rmScaleByte
00157
00158 #define KL_STAT_ALLOCATED_KERNEL_MEM 2
00159 #define KL_TYPE_ALLOCATED_KERNEL_MEM rmGauge
00160 #define KL_SIZE_ALLOCATED_KERNEL_MEM rmSizeU32
00161 #define KL_SCALE_ALLOCATED_KERNEL_MEM rmScaleByte
00162
00163 #define KL_STAT_ACTIVE_PROCESSES 3
00164 #define KL_TYPE_ACTIVE_PROCESSES rmGauge
00165 #define KL_SIZE_ACTIVE_PROCESSES rmSizeU32
00166 #define KL_SCALE_ACTIVE_PROCESSES rmScaleByte
00167
00168 #define KL_STAT_OPEN_FILE_DESCRIPTORS 4
00169 #define KL_TYPE_OPEN_FILE_DESCRIPTORS rmGauge
00170 #define KL_SIZE_OPEN_FILE_DESCRIPTORS rmSizeU32
00171 #define KL_SCALE_OPEN_FILE_DESCRIPTORS rmScaleNone
00172
00173 #define KL_STAT_CPU_KERNEL_UTILIZATION 5
00174 #define KL_TYPE_CPU_KERNEL_UTILIZATION rmGauge
00175 #define KL_SIZE_CPU_KERNEL_UTILIZATION rmSizeU32
00176 #define KL_SCALE_CPU_KERNEL_UTILIZATION rmScaleNone
00177
00178 #define KL_STAT_CPU_USER_UTILIZATION 6
00179 #define KL_TYPE_CPU_USER_UTILIZATION rmGauge
00180 #define KL_SIZE_CPU_USER_UTILIZATION rmSizeU32
00181 #define KL_SCALE_CPU_USER_UTILIZATION rmScaleNone
00182
00183 #define KL_STAT_INODE_USAGE 7
00184 #define KL_TYPE_INODE_USAGE rmGauge
00185 #define KL_SIZE_INODE_USAGE rmSizeU32
00186 #define KL_SCALE_INODE_USAGE rmScaleNone
00187
00188 #ifdef __cplusplus
00189 };
00190 #endif
00191 #endif // __RM_KernelMonitor_h__