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

LP #1644694: pt-stalk get wrong mysqld pid when the host installed multi mysql instance

Details

    • Yes
    • 0.5

    Description

      **Reported in Launchpad by zhechen last update 25-11-2016 14:13:03

      host env:
      Centos 6.8
      percona-toolkit-2.2.19

      two mysql instance:
      $ pidof mysqld
      33530 17881

      my host have two mysql instance, 3304 port(pid: 17881) and 3306 port(pid: 33530), when I use pt-stalk to monitor 3304 port, the mysql info logs in /var/lib/pt-stalk/ is about 3306 port, this is wrong, I just want log the mysql 3304 port.

      the following code in pt-stalk mabye get wrong mysql pid:

      792 collect() {
      793 local d="$1" # directory to save results in
      794 local p="$2" # prefix for each result file
      795
      796 local mysqld_pid=$(_pidof mysqld | awk '

      {print $1; exit;}

      ')
      797

      the subsequent mysql info will be wrong when mysqld_pid is wrong, pt-stalk should read mysql pid_file to get right pid number.

      Attachments

        Issue Links

          Activity

            People

              carlos.salguero Carlos Salguero (Inactive)
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist