thread_pool.asciidoc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. [[cat-thread-pool]]
  2. == cat thread pool
  3. The `thread_pool` command shows cluster wide thread pool statistics per node. By default the active, queue and rejected
  4. statistics are returned for all thread pools.
  5. [source,sh]
  6. --------------------------------------------------
  7. % curl 192.168.56.10:9200/_cat/thread_pool
  8. 0EWUhXe bulk 0 0 0
  9. 0EWUhXe fetch_shard_started 0 0 0
  10. 0EWUhXe fetch_shard_store 0 0 0
  11. 0EWUhXe flush 0 0 0
  12. 0EWUhXe force_merge 0 0 0
  13. 0EWUhXe generic 0 0 0
  14. 0EWUhXe get 0 0 0
  15. 0EWUhXe index 0 0 0
  16. 0EWUhXe listener 0 0 0
  17. 0EWUhXe management 1 0 0
  18. 0EWUhXe refresh 0 0 0
  19. 0EWUhXe search 0 0 0
  20. 0EWUhXe snapshot 0 0 0
  21. 0EWUhXe warmer 0 0 0
  22. --------------------------------------------------
  23. The first column is the node name
  24. [source,sh]
  25. --------------------------------------------------
  26. node_name
  27. 0EWUhXe
  28. --------------------------------------------------
  29. The second column is the thread pool name
  30. [source,sh]
  31. --------------------------------------------------
  32. name
  33. bulk
  34. fetch_shard_started
  35. fetch_shard_store
  36. flush
  37. force_merge
  38. generic
  39. get
  40. index
  41. listener
  42. management
  43. refresh
  44. search
  45. snapshot
  46. warmer
  47. --------------------------------------------------
  48. The next three columns show the active, queue, and rejected statistics for each thread pool
  49. [source,sh]
  50. --------------------------------------------------
  51. active queue rejected
  52. 0 0 0
  53. 0 0 0
  54. 0 0 0
  55. 0 0 0
  56. 0 0 0
  57. 0 0 0
  58. 0 0 0
  59. 0 0 0
  60. 0 0 0
  61. 1 0 0
  62. 0 0 0
  63. 0 0 0
  64. 0 0 0
  65. 0 0 0
  66. --------------------------------------------------
  67. The cat thread pool API accepts a `thread_pool_patterns` URL parameter for specifying a
  68. comma-separated list of regular expressions to match thread pool names.
  69. [source,sh]
  70. --------------------------------------------------
  71. % curl 'localhost:9200/_cat/thread_pool/generic?v&h=id,name,active,rejected,completed'
  72. id name active rejected completed
  73. 0EWUhXeBQtaVGlexUeVwMg generic 0 0 70
  74. --------------------------------------------------
  75. Here the host columns and the active, rejected and completed suggest thread pool statistics are displayed.
  76. All <<modules-threadpool,built-in thread pools>> and custom thread pools are available.
  77. [float]
  78. ==== Thread Pool Fields
  79. For each thread pool, you can load details about it by using the field names
  80. in the table below.
  81. [cols="<,<,<",options="header"]
  82. |=======================================================================
  83. |Field Name |Alias |Description
  84. |`type` |`t` |The current (*) type of thread pool (`fixed` or `scaling`)
  85. |`active` |`a` |The number of active threads in the current thread pool
  86. |`size` |`s` |The number of threads in the current thread pool
  87. |`queue` |`q` |The number of tasks in the queue for the current thread pool
  88. |`queue_size` |`qs` |The maximum number of tasks permitted in the queue for the current thread pool
  89. |`rejected` |`r` |The number of tasks rejected by the thread pool executor
  90. |`largest` |`l` |The highest number of active threads in the current thread pool
  91. |`completed` |`c` |The number of tasks completed by the thread pool executor
  92. |`min` |`mi` |The configured minimum number of active threads allowed in the current thread pool
  93. |`max` |`ma` |The configured maximum number of active threads allowed in the current thread pool
  94. |`keep_alive` |`k` |The configured keep alive time for threads
  95. |=======================================================================
  96. [float]
  97. === Other Fields
  98. In addition to details about each thread pool, it is also convenient to get an
  99. understanding of where those thread pools reside. As such, you can request
  100. other details like the `ip` of the responding node(s).
  101. [cols="<,<,<",options="header"]
  102. |=======================================================================
  103. |Field Name |Alias |Description
  104. |`node_id` |`id` |The unique node ID
  105. |`ephemeral_id`|`eid` |The ephemeral node ID
  106. |`pid` |`p` |The process ID of the running node
  107. |`host` |`h` |The hostname for the current node
  108. |`ip` |`i` |The IP address for the current node
  109. |`port` |`po` |The bound transport port for the current node
  110. |=======================================================================