Note
For V4.4.2, this view is available starting with V4.4.2 BP4.
Overview
This view displays the runtime status and resource usage of the JVM in the OBServer process on all OBServer nodes, including information such as the JVM status, heap memory, metaspace, GC, number of threads, and number of file descriptors. Each OBServer node corresponds to a row of records.
The usage instructions are as follows:
- The JVM is started only when the
ob_enable_java_envparameter is enabled. When it is not enabled, theSTATUSisDISABLED. - After the JVM is started, the system collects JVM status data by default every 60 seconds. A query on this view returns the result from the most recent collection and does not trigger JVM startup or another collection.
- Metrics that have not been successfully collected or cannot be obtained are displayed as NULL, to distinguish them from metrics whose actual value is
0. - For the status of the sandbox JVM when Java UDFs are executed in a sandbox process, see GV$OB_JAVA_SANDBOX_STATUS.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| PROCESS_PID | bigint(20) | YES | The process ID of the OBServer process. |
| STATUS | varchar(32) | NO | The status of the JVM in the OBServer process:
|
| INIT_ATTEMPT_COUNT | bigint(20) | YES | The cumulative number of attempts for JVM initialization. |
| INIT_FAILURE_COUNT | bigint(20) | YES | Cumulative number of JVM initialization failures. |
| LAST_INIT_ERROR_CODE | bigint(20) | YES | The error code of the most recent JVM initialization failure. This parameter is NULL if no initialization failures have occurred. |
| LAST_INIT_ERROR_TIME | timestamp(6) | YES | The time when the last JVM initialization failed. This column is NULL if no initialization failures have occurred. |
| JVM_START_TIME | timestamp(6) | YES | The startup time of the JVM. |
| JVM_UPTIME_MS | bigint(20) | YES | The duration for which the JVM has been running, in milliseconds. |
| MONITOR_BRIDGE_VERSION | bigint(20) | YES | The version number of the JVM monitoring API. |
| HEAP_USED_BYTES | bigint(20) | YES | The size of memory used by the JVM heap, in bytes. |
| HEAP_COMMITTED_BYTES | bigint(20) | YES | The size of committed memory in the JVM heap, in bytes. |
| HEAP_MAX_BYTES | bigint(20) | YES | The maximum size of the JVM heap memory available for use, in bytes. |
| YOUNG_USED_BYTES | bigint(20) | YES | The size of memory used by the young generation of the JVM, in bytes. |
| OLD_USED_BYTES | bigint(20) | YES | The size of memory occupied by old generation objects in the JVM, in bytes. |
| METASPACE_USED_BYTES | bigint(20) | YES | The size of the used JVM Metaspace, in bytes. |
| METASPACE_COMMITTED_BYTES | bigint(20) | YES | The size of the committed JVM metaspace, in bytes. |
| METASPACE_MAX_BYTES | bigint(20) | YES | The maximum size of the JVM metaspace available for use, in bytes. |
| CODE_CACHE_USED_BYTES | bigint(20) | YES | The size of the Code Cache used, in bytes. |
| DIRECT_BUFFER_USED_BYTES | bigint(20) | YES | The size of memory used by the JVM direct buffer, in bytes. |
| DIRECT_BUFFER_COUNT | bigint(20) | YES | The number of direct buffers in the JVM. |
| GC_COUNT | bigint(20) | YES | The cumulative number of GCs in the JVM. |
| GC_TIME_MS | bigint(20) | YES | The cumulative time spent on garbage collection in the JVM, in milliseconds. |
| YOUNG_GC_COUNT | bigint(20) | YES | The cumulative number of young generation GCs in the JVM. |
| YOUNG_GC_TIME_MS | bigint(20) | YES | The cumulative young generation GC time of the JVM, in milliseconds. |
| MAJOR_GC_COUNT | bigint(20) | YES | The cumulative number of major GCs in the JVM. |
| MAJOR_GC_TIME_MS | bigint(20) | YES | The cumulative duration of major GCs in the JVM, in milliseconds. |
| THREAD_COUNT | bigint(20) | YES | The current number of threads in the JVM. |
| PEAK_THREAD_COUNT | bigint(20) | YES | The peak number of threads in the JVM. |
| OPEN_FD_COUNT | bigint(20) | YES | The number of file descriptors currently open by the OBServer process. |
| MAX_FD_COUNT | bigint(20) | YES | The maximum number of file descriptors that an OBServer process can open. |
| COLLECT_ERROR_CODE | bigint(20) | YES | The error code from the most recent collection.0Indicates the collection was successful. |
| COLLECT_COST_US | bigint(20) | YES | The time consumed in the most recent collection, in microseconds. |
| LAST_COLLECT_ATTEMPT_TIME | timestamp(6) | YES | The time of the last collection attempt. |
| SNAPSHOT_TIME | timestamp(6) | YES | The time of the last successful data collection. |
| SNAPSHOT_AGE_US | bigint(20) | YES | Time elapsed since the last successful data collection, in microseconds. |
Sample query
Query the status, heap memory, number of GCs, and number of threads of the JVM in the OBServer process on all OBServer nodes.
obclient> SELECT SVR_IP, SVR_PORT, STATUS, HEAP_USED_BYTES, HEAP_MAX_BYTES, GC_COUNT, THREAD_COUNT, SNAPSHOT_TIME FROM oceanbase.GV$OB_JVM_STATUS;