Issues

Select view

Select search mode

 
50 of 72

``pt-stalk` with ``--mysql-only`` option was not adding MySQL ``processlist`` information to the output file.

Done

Description

mysql-only option is not working as expected.

By running :

/usr/bin/pt-stalk --host 127.0.0.1 --port 3355 --mysql-only --daemonize --log /tmp/pt-stalk/pt-stalk.log --dest /tmp/pt-stalk --function status --variable Threads_running --threshold 12 --cycles=10 --sleep=30 --run-time=20 --interval 5 --retention-time 1 --disk-pct-free 10

 

The generated file :

/tmp/pt-stalk/2018_07_03_14_30_22-processlist  is empty.

 

Only  by removing mysql-option, the file is populated.

I'am using 5.5.59-38.11-log Percona Server (GPL), Release 38.11, Revision 2084a7bc7ec version runnig on centos 6.9.

Kernel version :  2.6.32-696.20.1.el6.x86_64 #1 

Also, on my box, other mysql istances ( listening on different ports ) are running.

 

Thanks.

 

 

Environment

None

Smart Checklist

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Labels

Time tracking

2h logged

Smart Checklist

Created July 3, 2018 at 12:43 PM
Updated March 4, 2024 at 4:31 PM
Resolved September 13, 2019 at 2:24 PM

Activity

Stofa KenidaJuly 9, 2018 at 7:00 AM

Hi,

May be the fix should be moving this statement

local ts="$(date +"TS %s.%N %F %T")"

outside the if block started by be below statement 

if [ ! "$OPT_MYSQL_ONLY" ]; then

inside  the collect routine on put it just before the if condition.

 

Stofa.

 

 

 

Lalit ChoudharyJuly 6, 2018 at 1:44 PM

Problem: Use of pt-stalk with --mysql-only option not adding mysql processlist information in output file and file is always empty.

Tested for Percona toolkit-3.0.9, 3.0.10 with latest version of Percona server 5.5,5.6 and 5.7

Steps to reproduce the issue:
Case1: Pt-stalk with --*mysql-only option*

pt-stalk -u root --password=xxxxxxx --mysql-only --no-stalk --iterations=1 --sleep=30 --dest=./test1

For above pt-stalk run with --mysql-only option, empty processlist file generated at destination directory. Expectation is, it should have mysql processlist output in it.

Case2: Pt-stalk without --*mysql-only option*

pt-stalk -u root --password=xxxxxxx --mysql-only --no-stalk --iterations=1 --sleep=30 --dest=./test2

In this case, we are running similar pt-stalk command without --mysql-only option, which is generating processlist file which has mysql processlist information in it.

Lalit ChoudharyJuly 6, 2018 at 12:55 PM

Hello Stofa,

Thank you for the report.

Validated as Bug.