recap icon indicating copy to clipboard operation
recap copied to clipboard

option: mysql show processlist instead of show full processlist

Open mikegriffin opened this issue 4 years ago • 1 comments

It would be nice to have a non-FULL processlist configuration that continues to default to full processlist (call a new print_mysql_full_procs):

USEMYSQLFULLPROCESSLIST=yes

print_mysql_procs() ..

mysqladmin processlist

print_mysql_full_procs() mysqladmin -v processlist

Whether the above is implemented or not, it would be good to correct existing logging which incorrectly claims that "show processlist" was issued.

This feature request is to avoid having to suppress all error messages going to email from cron, when you regularly hit an error around max_allowed_packet, as might happen if you are often doing a large INSERT for bulk loading (eg you do not want to change the defaults for all local clients)

mikegriffin avatar Jul 13 '20 21:07 mikegriffin

Hi @mikegriffin thanks for opening this request.

I see the concern, currently the USEMYSQLPROCESSLIST is using -v in the process list command in a couple of places:

https://github.com/rackerlabs/recap/blob/b4d296a5d0291a020ef15ce3243837dbc68d0590/src/core/mysql#L104

https://github.com/rackerlabs/recap/blob/b4d296a5d0291a020ef15ce3243837dbc68d0590/src/core/mysql#L121

I think is easy to create a new function to distinguish between PROCESSLIST and FULL PROCESSLIST.

USEMYSQL is not enabled by default nor USEMYSQLPROCESSLIST

https://github.com/rackerlabs/recap/blob/b4d296a5d0291a020ef15ce3243837dbc68d0590/src/recap#L95-L99

Anyone wanting to use the mysql functionality would need to choose the desired option.

tonyskapunk avatar Jul 18 '20 20:07 tonyskapunk