[MXS-3037] show detail processlist like at mariadb Created: 2020-06-12  Updated: 2021-10-20  Resolved: 2021-10-14

Status: Closed
Project: MariaDB MaxScale
Component/s: maxadmin, maxctrl
Affects Version/s: None
Fix Version/s: 6.2.0

Type: New Feature Priority: Major
Reporter: febriyant Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS 7


Attachments: JPEG File Annotation 2020-06-13 193241.jpg    
Issue Links:
Blocks
blocks MXS-774 MaxScale can add processlist function ? Closed
Relates
relates to MXS-2757 list connected sessions with backend ... Closed
Sprint: MXS-SPRINT-142

 Description   

on mariadb when i need check what are query is running on mariadb instance.
i can see with SHOW PROCESSLIST or select to information_schema.processlist.

But after mariadb connect to maxscale i can't see process list like that.

any advice ?



 Comments   
Comment by markus makela [ 2020-06-12 ]

You can use maxctrl show sessions. We don't have SQL commands like SHOW PROCESSLIST.

Comment by febriyant [ 2020-06-13 ]

but part of queries is empty. how i see like on show processlist on mariadb ?

Comment by markus makela [ 2020-06-13 ]

I think if you add retain_last_statements=20 and dump_last_statements=on_error under the [maxsacle] section, it should show up. By default most of the time MaxScale doesn't keep the queries in memory while they're executed.

If possible, can you add the configuration you used to test this?

Comment by febriyant [ 2020-06-15 ]

I already set that parameter.
and queries is already show.

so there is queries is still running or sleep ??

Comment by markus makela [ 2020-08-20 ]

That is simply the list of queries that was executed.

I'll convert this into a feature request as there is no SHOW PROCESSLIST in MaxScale.

Comment by markus makela [ 2021-08-06 ]

This should be possible to implement purely in MaxCtrl as the query tracking is already implemented in MaxScale as a part of retain_last_statements.

I created an initial patch on the MXS-3037 branch that adds the list queries command. The output of the command is as follows:

┌────┬─────────┬──────────────────┬──────────┬────────────────────────────────┐
│ Id │ User    │ Host             │ Duration │ Query                          │
├────┼─────────┼──────────────────┼──────────┼────────────────────────────────┤
│ 2  │ maxuser │ ::ffff:127.0.0.1 │ 1s       │ select sleep(10)               │
├────┼─────────┼──────────────────┼──────────┼────────────────────────────────┤
│ 1  │ maxuser │ ::ffff:127.0.0.1 │ 1s       │ select sleep(5), "hello world" │
└────┴─────────┴──────────────────┴──────────┴────────────────────────────────┘

Comment by markus makela [ 2021-10-11 ]

This should be a small enough of an addition that it can go into 6.2. This is only a client-side change and requires no changes in MaxScale itself.

Generated at Thu Feb 08 04:18:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.