SHOW THREADS

SHOW THREADS [ OPTION columns=width[,format=sphinxql][,format=all] ]

SHOW THREADS is an SQL statement that displays information about all threads and their current activities.

The resulting table contains the following columns:

  • TID: ID assigned to the thread by the kernel
  • Name: Thread name, also visible in top, htop, ps, and other process-viewing tools
  • Proto: Connection protocol; possible values include sphinx, mysql, http, ssl, compressed, replication, or a combination (e.g., http,ssl or compressed,mysql)
  • State: Thread state; possible values are handshake, net_read, net_write, query, net_idle
  • Connection from: Client's ip:port
  • ConnID: Connection ID (starting from 0)
  • This/prev job time: When the thread is busy - how long the current job has been running; when the thread is idling - previous job duration + suffix prev
  • Jobs done: Number of jobs completed by this thread
  • Thread status: idling or working
  • Info: Information about the query, which may include multiple queries if the query targets a distributed table or a real-time table
‹›
  • SQL
  • JSON
  • PHP
  • Python
  • javascript
  • Java
  • C#
  • TypeScript
  • Go
📋
SHOW THREADS;
‹›
Response
*************************** 1. row ***************************
                TID: 83
               Name: work_1
              Proto: mysql
              State: query
    Connection from: 172.17.0.1:43300
             ConnID: 8
 This/prev job time: 630us
       CPU activity: 94.15%
          Jobs done: 2490
      Thread status: working
               Info: SHOW THREADS 
*************************** 2. row ***************************
                TID: 84
               Name: work_2
              Proto: mysql
              State: query
    Connection from: 172.17.0.1:43301
             ConnID: 9
 This/prev job time: 689us
       CPU activity: 89.23%
          Jobs done: 1830
      Thread status: working
               Info: show threads

The Info column displays:

  • Raw text of queries executed via the Manticore SQL interface
  • Full text syntax, comments, and data size for queries run through the internal Manticore binary protocol (e.g., from a remote Manticore instance)

You can limit the maximum width of the Info column by specifying the columns=N option.

By default, queries are displayed in their original format. However, when the format=sphinxql option is used, queries will be shown in SQL format, regardless of the protocol used for execution.

Using format=all will show all threads, while idling and system threads are hidden without this option (e.g., those busy with OPTIMIZE).

‹›
  • SQL
  • JSON
  • PHP
  • Python
  • javascript
  • Java
  • C#
  • TypeScript
  • Go
📋
SHOW THREADS OPTION columns=30\G

SHOW QUERIES

SHOW QUERIES

NOTE: SHOW QUERIES requires Manticore Buddy. If it doesn't work, make sure Buddy is installed.

SHOW QUERIES returns information about all currently running queries. The output is a table with the following structure:

  • id: Query ID that can be used in KILL to terminate the query
  • query: Query statement or a portion of it
  • time: Time taken on command execution or how long ago the query was performed (in this case, the value will include ago)
  • protocol: Connection protocol, with possible values being sphinx, mysql, http, ssl, compressed, replication, or a combination (e.g., http,ssl or compressed,mysql)
  • host: Client's ip:port
‹›
  • SQL
SQL
📋
mysql> SHOW QUERIES;
‹›
Response
+------+--------------+---------+----------+-----------------+
| id   | query        | time    | protocol | host            |
+------+--------------+---------+----------+-----------------+
|  111 | select       | 5ms ago | http     | 127.0.0.1:58986 |
|   96 | SHOW QUERIES | 255us   | mysql    | 127.0.0.1:33616 |
+------+--------------+---------+----------+-----------------+
2 rows in set (0.61 sec)

Refer to SHOW THREADS if you'd like to gain insight from the perspective of the threads themselves.

SHOW VERSION

SHOW VERSION

NOTE: SHOW VERSION requires Manticore Buddy. If it doesn't work, make sure Buddy is installed.

SHOW VERSION provides detailed version information of various components of the Manticore Search instance. This command is particularly useful for administrators and developers who need to verify the version of Manticore Search they are running, along with the versions of its associated components.

The output table includes two columns:

  • Component: This column names the specific component of Manticore Search.
  • Version: This column displays the version information for the respective component.
‹›
  • SQL
SQL
📋
mysql> SHOW VERSION;
‹›
Response
+-----------+--------------------------------+
| Component | Version                        |
+-----------+--------------------------------+
| Daemon    | 6.2.13 61cfe38d2@24011520 dev  |
| Columnar  | columnar 2.2.5 214ce90@240115  |
| Secondary | secondary 2.2.5 214ce90@240115 |
| KNN       | knn 2.2.5 214ce90@240115       |
| Buddy     | buddy v2.0.11                  |
+-----------+--------------------------------+