Description of problem: The "active-count" metric is missing for bounded-queue-thread-pool the same is available for unbounded-queue-thread-pool.This metric is essential to monitor approximate number of threads that are actively executing tasks. Version-Release number of selected component (if applicable): EAP 6.1.0 EAP 6.1.1 EAP 6.2 Beta How reproducible: Always Steps to Reproduce: 1. Install EAP 6.1.0 and start in standalone mode with default profile, use below CLI to create a bounded-queue-thread-pool. /subsystem=threads/bounded-queue-thread-pool=bounded-queue-test-thread-pool/:add(queue-length=2,max-threads=200,allow-core-timeout=true) 2. Now use below CLI to read the resource including runtime attributes and now observer output for "active-count" metric. /subsystem=threads/bounded-queue-thread-pool=bounded-queue-test-thread-pool/:read-resource(recursive-depth=0,include-runtime=true) Actual results: The "active-count" metric is missing for bounded-queue-thread-pool the same is available for unbounded-queue-thread-pool. Expected results: The "active-count" metric must be available for bounded-queue-thread-pool same as it is available for unbounded-queue-thread-pool. Additional info:
The reason for this is likely that the the underlying pools are JBoss Threads' JBossThreadPoolExecutor (extends j.u.c.ThreadPoolExecutor which has the attribute) and JBoss Threads' QueueExecutor (extends j.u.c.AbstractExecutorService which does not). To support this org.jboss.threads.QueueExecutor would need an equivalent method.
We have 7 choices in threads subsystem but their attributes seem not consistent. For example, "active-count" lacks in all "bounded" or "queueless" queues. And "queueless" ones have "queue-size" entries which are nonsense. A customer complained the lack of "active-count" which is a number of acutually being used threads out of "current-thread-count". ~~~ [standalone@localhost:9999 /] ls /subsystem=threads/ blocking-bounded-queue-thread-pool bounded-queue-thread-pool scheduled-thread-pool unbounded-queue-thread-pool blocking-queueless-thread-pool queueless-thread-pool thread-factory [standalone@localhost:9999 /] ls -l /subsystem=threads/unbounded-queue-thread-pool=ubqueue ATTRIBUTE VALUE TYPE active-count 0 INT completed-task-count 0 INT current-thread-count 0 INT keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name ubqueue STRING queue-size 0 INT rejected-count 0 INT task-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/bounded-queue-thread-pool=bqueue ATTRIBUTE VALUE TYPE allow-core-timeout false BOOLEAN core-threads undefined INT current-thread-count 0 INT handoff-executor undefined STRING keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name bqueue STRING queue-length 5 INT queue-size 0 INT rejected-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/blocking-bounded-queue-thread-pool=bbqueue ATTRIBUTE VALUE TYPE allow-core-timeout false BOOLEAN core-threads undefined INT current-thread-count 0 INT keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name bbqueue STRING queue-length 5 INT queue-size 0 INT rejected-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/queueless-thread-pool=qltpool ATTRIBUTE VALUE TYPE current-thread-count 0 INT handoff-executor undefined STRING keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name qltpool STRING queue-size 0 INT rejected-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/blocking-queueless-thread-pool=bqltpool ATTRIBUTE VALUE TYPE current-thread-count 0 INT keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name bqltpool STRING queue-size 0 INT rejected-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/scheduled-thread-pool=stpool ATTRIBUTE VALUE TYPE active-count 0 INT completed-task-count 0 INT current-thread-count 0 INT keepalive-time undefined OBJECT largest-thread-count 0 INT max-threads 10 INT name stpool STRING queue-size 0 INT task-count 0 INT thread-factory undefined STRING [standalone@localhost:9999 /] ls -l /subsystem=threads/thread-factory=tfactory ATTRIBUTE VALUE TYPE group-name undefined STRING name tfactory STRING priority undefined INT thread-name-pattern undefined STRING ~~~