> ## Documentation Index
> Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW PROCESSLIST

> Use the `SHOW PROCESSLIST` command to display the current workload of the system. The output of this command consists of id, user, host, database, time, and info.

The following table explains the output in detail:

| Output     | Description                                |
| :--------- | :----------------------------------------- |
| worker\_id | The id of the worker running the process.  |
| id         | The id of the process.                     |
| user       | The username associated with the process.  |
| host       | The host to which the client is connected. |
| database   | The database if one is selected.           |
| time       | The elapsed time since the running sql.    |
| info       | The statement being executed.              |

<Note>
  This command only shows the frontend received processlist now.
</Note>

## Syntax

```sql theme={null}
SHOW PROCESSLIST;
```

## Example

```sql theme={null}
SHOW PROCESSLIST;
------RESULT
 Worker Id | Id  | User |      Host       | Database |  Time  |         Info          
-----------+-----+------+-----------------+----------+--------+-----------------------
 2         | 2:0 | root | 127.0.0.1:50447 | dev      | 4114ms | SELECT pg_sleep(3600)
 3         | 3:1 | root | 127.0.0.1:50457 | dev      | 6ms    | SHOW PROCESSLIST
 3         | 3:0 | root | 127.0.0.1:50453 | dev      | 2844ms | SELECT pg_sleep(3600)
(3 rows)
```

## Terminate the process

After using the `SHOW PROCESSLIST` command to display the running processes, you can terminate them by the `KILL` command.

### Syntax

```sql theme={null}
KILL id;
```

### Example

```sql theme={null}
SHOW PROCESSLIST;
------RESULT
 Worker Id | Id  | User |      Host       | Database |  Time  |         Info          
-----------+-----+------+-----------------+----------+--------+-----------------------
 2         | 2:0 | root | 127.0.0.1:50447 | dev      | 4114ms | SELECT pg_sleep(3600)
 3         | 3:1 | root | 127.0.0.1:50457 | dev      | 6ms    | SHOW PROCESSLIST
 3         | 3:0 | root | 127.0.0.1:50453 | dev      | 2844ms | SELECT pg_sleep(3600)
(3 rows)

KILL '2:0';
------RESULT
KILL

KILL '3:0';
------RESULT
KILL

SHOW PROCESSLIST;
------RESULT
 Worker Id | Id  | User |      Host       | Database | Time |       Info       
-----------+-----+------+-----------------+----------+------+------------------
 2         | 2:0 | root | 127.0.0.1:50447 | dev      |      | 
 3         | 3:1 | root | 127.0.0.1:50457 | dev      | 2ms  | SHOW PROCESSLIST
 3         | 3:0 | root | 127.0.0.1:50453 | dev      |      | 
(3 rows)
```
