ElasticSearch cat thread pool

x33g5p2x  于2021-03-14 发布在 ElasticSearch  
字(2.2k)|赞(0)|评价(0)|浏览(231)

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cat-thread-pool.html

译文链接 : http://www.apache.wiki/display/Elasticsearch/cat+thread+pool

贡献者 : [那伊抹微笑]

thread_pool 命令展示了集群中每一个节点的线程池的统计信息。默认情况下返回所有线程池的 actinve(活跃的),queue(队列中的)和 reject(拒绝的)的统计信息。

% curl 192.168.56.10:9200/_cat/thread_pool
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

第一列是节点名

node_name
0EWUhXe

第二列是线程池名

name
bulk
fetch_shard_started
fetch_shard_store
flush
force_merge
generic
get
index
listener
management
refresh
search
snapshot
warmer

接下来的三列是所有线程池的 actinve(活跃的),queue(队列中的)和 reject(拒绝的)的统计信息。

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

cat thread pool API 接受一个 **thread_pool_patterns**URL 参数,该参数指定一个逗号分隔的正则表达式列表以匹配线程池名称。

% curl 'localhost:9200/_cat/thread_pool/generic?v&h=id,name,active,rejected,completed'
id                     name    active rejected completed
0EWUhXeBQtaVGlexUeVwMg generic      0        0        70

在这里,建议线程池的统计信息展示 hostactiverejectedcompleted 列。

所有 built-in thread pools 和自定义的线程池都是可用的。

线程池字段

对于每个线程池来说,您可以通过使用表哥中的字段名来获得详细说明。

Field Name(字段名)Alias(别名)Description(描述)
typetThe current (*) type of thread pool (fixed or scaling)
activeaThe number of active threads in the current thread pool
sizesThe number of threads in the current thread pool
queueqThe number of tasks in the queue for the current thread pool
queue_sizeqsThe maximum number of tasks permitted in the queue for the current thread pool
rejectedrThe number of tasks rejected by the thread pool executor
largestlThe highest number of active threads in the current thread pool
completedcThe number of tasks completed by the thread pool executor
minmiThe configured minimum number of active threads allowed in the current thread pool
maxmaThe configured maximum number of active threads allowed in the current thread pool
keep_alivekThe configured keep alive time for threads

其它字段

除了每个线程池的详细说明之外,它也可以方便理解线程池的内部。同样的,您可以请求响应的节点的其它详细说明。(例如 ip

Field Name(字段名)Alias(别名)Description(描述)
node_ididThe unique node ID
ephemeral_ideidThe ephemeral node ID
pidpThe process ID of the running node
hosthThe hostname for the current node
ipiThe IP address for the current node
portpoThe bound transport port for the current node

相关文章

热门文章

更多