LP #1417558: pt-stalk with --collect-strace output doesn't go to an YYYY_MM_DD_HH_mm_ss-strace file

Description

**Reported in Launchpad by Daniel Guzmán Burgos last update 15-04-2015 15:41:31

pt-stalk when used along with --collect-strace doesn't write the strace output to the expected destination file, and by inspecting the code looks like is because 2 reasons:

$CMD_STRACE -T -s 0 -f -p $mysqld_pid > "${DEST}/$d-strace" &

The ${DEST} variable is not defined. And the strace output is written to the stderr, not the stdout. Also, destination file should be "$d/$p-strace"

A fix for this could be to pass the destination file as a -o param:

$CMD_STRACE -T -s 0 -f -p $mysqld_pid -o "$d/$p-strace" &

Which it works.

Tested on pt-stalk v. 2.2.13

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 4:37 PM

**Comment from Launchpad by: Frank Cizmich on: 03-02-2015 21:07:13

Confirmed, fixed and tested using Daniel Guzman's suggestion.

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 4:36 PM
Updated January 24, 2018 at 4:37 PM
Resolved January 24, 2018 at 4:36 PM