Commit Graph

67 Commits

Author SHA1 Message Date
Sveta Smirnova
19baa34872 PT-2295 - Fix tests on distributions
- Fixed sporadic pt-tc failures on rolled back SHOW MASTER STATUS code
- Added better diagnostic info for sporadically failing t/pt-table-checksum/basics.t
- Decreased chunk size it t/pt-table-checksum/progress.t, so this test
  has less chances to fail, because pt-osc finishes faster than expected
2024-02-13 20:03:32 +03:00
Sveta Smirnova
3fa1d8dfed PR-160 - added support for operf if present, and if CMD_OPCONTROL is not set
- Added back support for CMD_OPCONTROL
2024-01-26 16:39:26 +03:00
Sveta Smirnova
5ca0e8a898 PR-160 - added support for operf if present, and if CMD_OPCONTROL is not set
- Made PR actually working
2024-01-26 01:01:23 +03:00
Sveta Smirnova
8e3ce6c74f Merge branch '3.x' into HEAD 2024-01-25 01:50:05 +03:00
Sveta Smirnova
f8c43118bd PT-2168 pt-osc shouldnt fail while unable to monitor a replica node (#676)
* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Proof of concept
- Fixed regular expression in lib/TableParser.pm mistakenly chaged in the tool's code

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added basic test case for PT-2168
- Added more details for replica lag information
- Disconnecting replica if lag is not checked. This prevents "Too many
  connections" error

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Implemented option --wait-lost-replicas for pt-osc, added test case

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added more tests for situations where connection to the replica can
  fail

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Removed extra checks for wait_no_die variable
- Added test cases for SQL queries that pt-osc sends to replicas

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Allow to reload dsns table while waiting for missed replica if
  --recursion-method is dsn
- Fixed logic in replica rediscovery, so it works with replicas on the
  same host but with different ports
- Renamed option wait-lost-replicas to fail-on-stopped-replication, so
  it is in line with pt-table-checksum
- Adjusted tests
- Removed debug code for PT-1760
- Added test case for PT-1760
- Added exception for variable Open_tables_with_triggers in
  lib/bash/collect.sh due to failed test in Percona Server 8.0.34+
- Updated pt-stalk

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Updated modules
- Fixed typo in t/pt-table-sync/bidirectional.t
- Removed trailing whitespaces in lib/MasterSlave.pm

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Help for option --fail-on-stopped-replication

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added check for availability of the simple_rewrite_plugin in t/pt-online-schema-change/pt-2168.t

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added link to the simple_rewrite_plugin source code
- Removed tests for code that runs only in the beginning of pt-osc
  action, so should not be affected by the option fail-on-stopped-replication
2023-09-19 23:31:33 +03:00
Viktor Szépe
2bd40d8c39 Remove trailing spaces (#665)
* Remove trailing spaces

* PR-665 -  Remove trailing spaces

- Updated not stable test t/pt-online-schema-change/preserve_triggers.t
- Updated utilities in bin directory

* PR-665 -  Remove trailing spaces

- Fixed typos

* PR-665 -  Remove trailing spaces

- Fixed typos

---------

Co-authored-by: Sveta Smirnova <sveta.smirnova@percona.com>
2023-09-06 01:15:12 +03:00
グリアンドロ
163376af69 PT-2084 show slave status (#545)
* PT-2084 Readding SHOW SLAVE STATUS outputs to pt-stalk

Before, they were only gathered if version was 5.6 or prior.
Now, they are always gathered, no matter what version.
Since ${mysql_version} is only major.minor, we can't yet add
SHOW REPLICA STATUS, because it starts on 8.0.22 and we have
no way to check that. We will need to wait for 8.1 release.

* PT-2084 Ran update-modules to generate binaries with changes.

* PT-2084 Added checks for preemptive 8.1 SHOW SLAVE STATUS removal.

* PT-2084 Adding test case for SHOW SLAVE STATUS

* Update t/pt-stalk/pt-stalk-replication.t

---------

Co-authored-by: Sveta Smirnova <svetasmirnova@users.noreply.github.com>
2023-02-02 17:08:54 +03:00
Sveta Smirnova
19aa46d1a5 PT-1052 include numa information in pt tool output (#547)
* PT-1052: fix for pt-summary

* Re-added fix from commit 71fae6d117 into proper place: library directory
Added tests for PT-1052 (pt-summary only)

* Fixed tests for pt-summary,
set locale for pt-summary tests, so they are not affected by user environment.
Finished tests for PT-1052

* Added fix for PT-1983 into the proper place: library file

* PT-1052: fix for pt-stalk which now includes numastat data
2022-08-15 15:45:24 +03:00
Sveta Smirnova
ac3843bcb7 Pt 1897 lock information in8.0 in pt stalk (#544)
* PT-1897 pt-stalk on MySQL 8 not collecting lock information

For version prior 8.0 pt-stalk continue using Information Schema INNODB_LOCKS and INNODB_LOCK_WAITS tables for collecting lock information.
For version 8.0 and higher pt-stalk uses tables data_locks and data_lock_waits in Performance Schema

* PT-1897 - Better MariaDB support

We cannot simply compare version number with 8.0 to identify if lock tables are in Performance Schema,
because MariaDB 10.x still have them in the Information Schema.
Therefore added additional flag, indicating which syntax we should use

* Tests for PT-1897
2022-07-25 10:01:14 -03:00
Sveta Smirnova
07ee5eb1bf PS-2033, proof of concept (#540) 2022-07-11 15:51:29 +03:00
Sveta Smirnova
22ed941238 PT-1218: pt-stalk ominous open_tables function (#535)
After discussion change only affects error message that is more user-friendly now.
I also added two tests that check how open_tables function works in both cases:
with number of open tables less tha 1000 and greater than 1000
2022-03-22 09:33:05 -03:00
svetasmirnova
9427c16314 PT-2037 - regression fixes
Re-added fix for PT-1340 that was reverted by fix for PT-1398
2022-01-23 03:55:35 +03:00
svetasmirnova
623fdaec91 PT-2037 - option --system-only for pt-stalk
This commit:
1. Moves all changes to the proper place: lib/bash/collect.sh
2. Refactors pt-stalk so it is more modular
3. Places fix for PT-1734 into the right place: lib/bash/collect.sh
4. Fixes tests for PT-1336
2022-01-22 21:21:05 +03:00
Carlos Salguero
951a333c81 PT-1398 Updated way of getting MySQL PID (#517) 2021-10-01 09:27:20 -03:00
Carlos Salguero
53ce571bf1 PT-633 Added --mysql-only option to pt-stalk 2018-02-12 16:40:30 -03:00
Carlos Salguero
0786db016d PT-218 Added RocksDB status section to pt-stalk 2017-12-13 13:51:08 -03:00
guriandoro
b775701551 Merge branch '3.0' into pt-stalk-collect-prepared-statements-LP1642750
Conflicts:
	bin/pt-stalk
	lib/bash/collect.sh
2017-06-10 11:45:33 -04:00
guriandoro
437d28837b Changes for LP1510809. ps -eaF is captured now.
Modified f argument, for F. From man pages:

" -F     Extra full format.  See the -f option, which -F implies."

The following columns have been added to the output, due to this
change:

SZ   size in physical pages of the core image of the process.
     This includes text, data, and stack space.  Device mappings
     are currently excluded; this is subject to change.

RSS  resident set size, the non-swapped physical memory that a
     task has used (inkiloBytes).

PSR  processor that process is currently assigned to.
2017-04-11 19:15:14 -04:00
Carlos Salguero
fac4be64b4 Merge branch '3.0' into issue-1642754 2017-03-28 14:08:51 -03:00
Carlos Salguero
1926bd60b4 PT-111 Collect MySQL variables 2017-03-28 14:03:40 -03:00
Carlos Salguero
be971eeee5 PT-80 Collect replication slave information 2017-03-27 17:30:06 -03:00
Carlos Salguero
ad73055a5b Changed how we invoke MySQL from pt-stalk 2017-03-22 19:38:09 -03:00
guriandoro
0e5a08342d Merge branch '3.0' into pt-stalk-collect-prepared-statements-LP1642750 2017-03-22 16:34:34 -04:00
Carlos Salguero
759ee9196e Updated collect.sh because of a syntax error 2017-03-22 17:32:14 -03:00
guriandoro
32745039b5 Merge branch '3.0' into pt-stalk-collect-prepared-statements-LP1642750 2017-03-22 16:19:19 -04:00
Carlos Salguero
a117e63e89 Added MySQL version check to stalk ps queries 2017-03-22 12:38:11 -03:00
guriandoro
e8ad42955d PT-90 Adding collect for LP:1642750
pt-stalk will now also collect from P_S.prepared_statements_instances
2017-03-22 10:53:34 -04:00
Carlos Salguero
91ec593da5 Merge pull request #174 from percona/PT-89
PT-89 Now top runs using -bn${OPT_RUN_TIME}
2017-03-21 19:25:30 +02:00
Carlos Salguero
4a056cf3b0 PT-81 Collect information about locks and transactions using P_S 2017-03-21 13:45:59 -03:00
Carlos Salguero
076864c79e PT-89 Now top runs using -bn${OPT_RUN_TIME} 2017-03-01 13:30:09 -03:00
Carlos Salguero
90e1e9cf1e PT-81 Moved functions to the collect module 2017-02-25 10:41:07 -03:00
Fernando Ipar
102ac33210 doing system wide operf 2017-01-24 19:34:02 -03:00
Fernando Ipar
b53a9a76fe added support for operf if present, and if CMD_OPCONTROL is not set 2017-01-24 16:04:37 -03:00
frank-cizmich
c3f4705b67 pt-stalk sort transactions - lp1537416 2016-06-09 14:31:19 -03:00
frank-cizmich
377b50144b new var binlog_error_action caused bug in collect module 2016-02-11 17:44:20 -03:00
Frank Cizmich
1e2e7b5a18 pt-stalk now collects 1 minute of dmesg output preceding trigger event - 1349086 2014-10-22 16:16:13 -02:00
Daniel Nichter
69586fdf50 Revert r587: *do* sync on clock ticks. Fix pt-stalk.t (127.1 no longer works?). Enhance --sleep-collect docs. 2013-12-13 20:19:51 -08:00
Daniel Nichter
5035de3fbb Calc cnt for iostat, vmstat, mpstat, and mysqladmin -c as --run-time/--sleep-collect. 2013-07-24 13:29:23 -07:00
Daniel Nichter
47ef093a58 Calc collect loop run time based on start ts - curr ts so arbitrary --sleep-collect work. Do not sync on clock ticks. 2013-07-24 12:49:28 -07:00
Daniel Nichter
86a949253d Allow string interpol in collect sleep calc so --sleep-collect works. 2013-07-24 12:08:01 -07:00
Daniel Nichter
50301e51d5 Add --sleep-collect, default 1. 2013-07-24 11:53:08 -07:00
Daniel Nichter
5a5fe75130 Merge pt-stalk-1019648. 2013-03-12 15:23:02 -06:00
Daniel Nichter
7f728acddd Move code to get InnoDB status into its own sub. 2013-03-12 15:08:25 -06:00
Daniel Nichter
f7f63555ee Add lib/bash/subshell.sh and use in pt-stalk to fix/improve subprocess waiting. 2013-03-04 17:47:02 -07:00
Fernando Ipar
177c2aaef7 Changed collect so that innodb status is read from tmp file if the original output is truncated 2013-03-04 17:40:41 -02:00
Brian Fraser fraserb@gmail.com
22ec559b38 Fix for 986847: Allow setting which commands (and extra options) pt-stalk uses through env vars 2012-11-12 11:26:01 -03:00
Daniel Nichter
d04529a64b Wait --run-time more for collector procs to finish, then kill them, then remove empty files. 2012-10-13 12:21:52 -06:00
Daniel Nichter
e1bd108aa4 Collect INNODB_TRX, INNODB_LOCKS, and INNODB_LOCK_WAITS. Fix update-module so it works again with Bash tools. 2012-08-30 15:40:09 -06:00
Daniel Nichter
b5ba79bb6d Collect df -k instead of df -h. Set log_error with abs path to fix failing t/lib/bash/collect.t test. 2012-08-14 09:11:41 -06:00
Daniel Nichter
94d9483d03 Make vmstat, iostat, and mpstat run for --run-time not --interval. 2012-03-30 11:35:32 -06:00