2014-01-25 12:20:46 -05:00
|
|
|
[[cat-thread-pool]]
|
2014-05-16 15:43:35 -04:00
|
|
|
== cat thread pool
|
2014-01-25 12:20:46 -05:00
|
|
|
|
|
|
|
The `thread_pool` command shows cluster wide thread pool statistics per node. By default the active, queue and rejected
|
2016-08-03 23:02:13 -04:00
|
|
|
statistics are returned for all thread pools.
|
2014-01-25 12:20:46 -05:00
|
|
|
|
2015-07-14 12:14:09 -04:00
|
|
|
[source,sh]
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
% curl 192.168.56.10:9200/_cat/thread_pool
|
2016-08-03 23:02:13 -04:00
|
|
|
0EWUhXe bulk 0 0 0
|
|
|
|
0EWUhXe fetch_shard_started 0 0 0
|
|
|
|
0EWUhXe fetch_shard_store 0 0 0
|
|
|
|
0EWUhXe flush 0 0 0
|
|
|
|
0EWUhXe force_merge 0 0 0
|
|
|
|
0EWUhXe generic 0 0 0
|
|
|
|
0EWUhXe get 0 0 0
|
|
|
|
0EWUhXe index 0 0 0
|
|
|
|
0EWUhXe listener 0 0 0
|
|
|
|
0EWUhXe management 1 0 0
|
|
|
|
0EWUhXe refresh 0 0 0
|
|
|
|
0EWUhXe search 0 0 0
|
|
|
|
0EWUhXe snapshot 0 0 0
|
|
|
|
0EWUhXe warmer 0 0 0
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
The first column is the node name
|
2014-01-25 12:20:46 -05:00
|
|
|
|
2015-07-14 12:14:09 -04:00
|
|
|
[source,sh]
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
2016-08-03 23:02:13 -04:00
|
|
|
node_name
|
|
|
|
0EWUhXe
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
The second column is the thread pool name
|
2015-07-14 12:14:09 -04:00
|
|
|
[source,sh]
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
2016-08-03 23:02:13 -04:00
|
|
|
name
|
|
|
|
bulk
|
|
|
|
fetch_shard_started
|
|
|
|
fetch_shard_store
|
|
|
|
flush
|
|
|
|
force_merge
|
|
|
|
generic
|
|
|
|
get
|
|
|
|
index
|
|
|
|
listener
|
|
|
|
management
|
|
|
|
refresh
|
|
|
|
search
|
|
|
|
snapshot
|
|
|
|
warmer
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
The next three columns show the active, queue, and rejected statistics for each thread pool
|
2014-01-25 12:20:46 -05:00
|
|
|
|
2015-07-14 12:14:09 -04:00
|
|
|
[source,sh]
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
2016-08-03 23:02:13 -04:00
|
|
|
active queue rejected
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
1 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
|
|
|
0 0 0
|
2014-01-25 12:20:46 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
The cat thread pool API accepts a `thread_pool_patterns` URL parameter for specifying a
|
|
|
|
comma-separated list of regular expressions to match thread pool names.
|
2014-03-27 02:46:11 -04:00
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
[source,sh]
|
|
|
|
--------------------------------------------------
|
|
|
|
% curl 'localhost:9200/_cat/thread_pool/generic?v&h=id,name,active,rejected,completed'
|
|
|
|
id name active rejected completed
|
|
|
|
0EWUhXeBQtaVGlexUeVwMg generic 0 0 70
|
|
|
|
--------------------------------------------------
|
2014-03-27 02:46:11 -04:00
|
|
|
|
2017-02-16 14:41:42 -05:00
|
|
|
Here the host columns and the active, rejected and completed suggest thread pool statistics are displayed.
|
2014-03-27 02:46:11 -04:00
|
|
|
|
2016-08-03 23:02:13 -04:00
|
|
|
All <<modules-threadpool,built-in thread pools>> and custom thread pools are available.
|
2014-03-27 02:46:11 -04:00
|
|
|
[float]
|
|
|
|
==== Thread Pool Fields
|
|
|
|
|
|
|
|
For each thread pool, you can load details about it by using the field names
|
2016-08-03 23:02:13 -04:00
|
|
|
in the table below.
|
2014-03-27 02:46:11 -04:00
|
|
|
|
|
|
|
[cols="<,<,<",options="header"]
|
|
|
|
|=======================================================================
|
|
|
|
|Field Name |Alias |Description
|
2016-08-03 23:02:13 -04:00
|
|
|
|`type` |`t` |The current (*) type of thread pool (`fixed` or `scaling`)
|
2014-03-27 02:46:11 -04:00
|
|
|
|`active` |`a` |The number of active threads in the current thread pool
|
|
|
|
|`size` |`s` |The number of threads in the current thread pool
|
|
|
|
|`queue` |`q` |The number of tasks in the queue for the current thread pool
|
2016-08-03 23:02:13 -04:00
|
|
|
|`queue_size` |`qs` |The maximum number of tasks permitted in the queue for the current thread pool
|
|
|
|
|`rejected` |`r` |The number of tasks rejected by the thread pool executor
|
2014-03-27 02:46:11 -04:00
|
|
|
|`largest` |`l` |The highest number of active threads in the current thread pool
|
2016-08-03 23:02:13 -04:00
|
|
|
|`completed` |`c` |The number of tasks completed by the thread pool executor
|
2014-03-27 02:46:11 -04:00
|
|
|
|`min` |`mi` |The configured minimum number of active threads allowed in the current thread pool
|
|
|
|
|`max` |`ma` |The configured maximum number of active threads allowed in the current thread pool
|
2016-08-03 23:02:13 -04:00
|
|
|
|`keep_alive` |`k` |The configured keep alive time for threads
|
2014-03-27 02:46:11 -04:00
|
|
|
|=======================================================================
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Other Fields
|
|
|
|
|
|
|
|
In addition to details about each thread pool, it is also convenient to get an
|
2016-08-03 23:02:13 -04:00
|
|
|
understanding of where those thread pools reside. As such, you can request
|
2014-03-27 02:46:11 -04:00
|
|
|
other details like the `ip` of the responding node(s).
|
|
|
|
|
|
|
|
[cols="<,<,<",options="header"]
|
|
|
|
|=======================================================================
|
|
|
|
|Field Name |Alias |Description
|
2016-08-03 23:02:13 -04:00
|
|
|
|`node_id` |`id` |The unique node ID
|
|
|
|
|`ephemeral_id`|`eid` |The ephemeral node ID
|
2014-03-27 02:46:11 -04:00
|
|
|
|`pid` |`p` |The process ID of the running node
|
|
|
|
|`host` |`h` |The hostname for the current node
|
|
|
|
|`ip` |`i` |The IP address for the current node
|
|
|
|
|`port` |`po` |The bound transport port for the current node
|
2015-09-17 16:36:25 -04:00
|
|
|
|=======================================================================
|