Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1631

pt-ioprofile doesn't work in CentOS 7.5 box

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.0.12
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      pt-ioprofile doesn't work in CentOS 7.5 box.
      Because of strace's output format has been changed between CentOS 6.x and CentOS 7.x

      pt-ioprofile expects `/^Process:/ ` but new-strace prints that as "strace: Process xxx 
      See https://github.com/percona/percona-toolkit/blob/3.0.12/bin/pt-ioprofile#L574

       

      1. How to repeat

       

      Run `pt-ioprofile` at CentOS 7.x box with `mysqlslap` .

       

      ```

      $ cat /etc/centos-release
      CentOS Linux release 7.5.1804 (Core)

      $ pt-ioprofile --version
      pt-ioprofile 3.0.12

      $ pt-ioprofile
      Tue Oct 16 12:03:07 JST 2018
      Tracing process ID 27454
      total filename

      ```

       

        1. strace output sample.

       

      • CentOS 6.9

      ```

      $ strace -V
      strace – version 4.8

       

      $ strace -f -s 0 -T -p 722 2>&1 | head -1
      Process 722 attached
      ```

      • CentOS 7.x

       

      ```

      $ strace -V
      strace – version 4.12

       

      $ strace -f -s 0 -T -p 7674 2>&1 | head -1
      strace: Process 7674 attached
      ```

       

      1. suggested fix

       

      Patch into the line of https://github.com/percona/percona-toolkit/blob/3.0.12/bin/pt-ioprofile#L574

       
      ```

      574c574
      < /^Process/ { mode = "strace"; }

      > /^(strace: )?Process/ { mode = "strace"; }

      ```

       

       

       

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                yoku0825 Tsubasa Tanaka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: