NUMTHREADS view
The DVSYS.NUMTHREADS view provides a summary of the total number of Java virtual machine (JVM) threads.
For more information on JVM threads, see Thread.
Column | Type | Description |
---|---|---|
NODE_NAME | VARCHAR(80) | Name of the node where the query ran. |
GRP | VARCHAR(80) | The thread group, which represents a set of threads. |
NAME | VARCHAR(128) | The name of the thread. |
NUMTHREADS | BIGINT | The number of threads for NODE_NAME, GRP, and NAME. Note: Threads with similar thread names
are grouped together if there isn't a
NAME IS NULL predicate. |
The NUMTHREADS view has two variations:
-
- Variation 1
- The first variation calls the query without a predicate on the NAME column. The output displays
the number of threads (
NUMTHREADS
) based on the node name (NODE_NAME
), thread group (GRP
), and name. The thread names are displayed by truncating the dash (-) or by underscoring (_) the numeric identifier.Example thread names:
Thread, NetworkServerThread, Timer
Example call and output:SELECT * FROM DVSYS.NUMTHREADS
NODE_NAME GRP NAME NUMTHREADS ----------------------------------------------------------------------------------------------------- AdminNode derby.daemons NetworkServerThread 1 AdminNode derby.daemons derby.NetworkServerStarter 1 AdminNode derby.daemons derby.rawStoreDaemon 1 AdminNode derby.daemons DRDAConnThread 2 AdminNode InnocuousThreadGroup Common-Cleaner 1 AdminNode main DB Connections checker 1 AdminNode main DiscoveryServerTCP 1 AdminNode main GaianNode Watchdog 1 AdminNode main Thread 1 fmp_1 system JIT Diagnostic Compilation Thread 1 fmp_1 system JIT-SamplerThread 1 fmp_1 system GC Worker 3 fmp_1 system JIT Compilation Thread 7 cdb2udvdvendpoint0 derby.daemons GaianDataSourceExecutor 1 cdb2udvdvendpoint0 derby.daemons NetworkServerThread 1
-
- Variation 2
-
The second variation calls the query with
NAME IS NULL
. The output displays the total number of threads (NUMTHREADS
) of the same group, based on the node name (NODE_NAME
) and thread group (GRP
). There are no thread names.Example call and output:SELECT * FROM DVSYS.NUMTHREADS WHERE NAME IS NULL
NODE_NAME GRP NAME NUMTHREADS ------------------------------------------------------------------------ AdminNode InnocuousThreadGroup - 1 AdminNode derby.daemons - 6 AdminNode main - 16 AdminNode system - 29