PT-ALIGN(1)

πŸ’… PT-ALIGN(1) β€” like, the manual page, bestie

okay so this is pt-align, and it lives in the User Contributed Perl Documentation section of your manual, which is exactly where you'd expect to find it. pull up a chair, we're aligning things πŸ’–


✨ NAME ✨

pt-align β€” aligns the output from other tools into actual columns. yes, that's the whole gig. and it ate. πŸŽ€


🌸 SYNOPSIS 🌸

Usage: pt-align [FILES]

pt-align takes output from other tools and lines it all up into columns. no FILES given? then it just reads from STDIN, easy peasy πŸ¦‹

so say some tool prints this messy little thing:

DATABASE TABLE   ROWS
foo      bar      100
long_db_name table  1
another  long_name 500

pt-align will reprint it like this, all gorgeous and tidy:

DATABASE     TABLE     ROWS
foo          bar        100
long_db_name table        1
another      long_name  500

the glow-up is real, no cap ✨


πŸ”₯ RISKS πŸ”₯

Percona Toolkit is mature, it's proven in the real world, and it's well tested β€” but like, all database tools can pose a risk to your system and your database server. so before you use this tool, please, for the love of everything:

  • read the tool's documentation
  • review the tool's known "BUGS"
  • test the tool on a non-production server (do NOT skip this one πŸ™ˆ)
  • backup your production server and verify the backups (a backup you never verified is giving ✨delusion✨)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe of how it works. pt-align reads lines and splits them into words. it counts how many words each line has, and if there's one number that predominates, it assumes that's the number of words in each line. icon behavior honestly. 🧚

then it discards all the lines that don't have that many words, and looks at the 2nd line that does. it assumes this is the first non-header line. then β€” based on whether each word looks numeric or not β€” it decides on column alignment. finally it goes through and decides how wide each column should be, and then prints them out. periodt. πŸ’…

this is genuinely useful for stuff like aligning the output of vmstat or iostat so it's actually easier to read. obsessed. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

this tool accepts additional command-line arguments, bestie. refer to the "SYNOPSIS" and the usage information for the details 🌈

  • --[no]buffer-stdout β€” default: yes. enables STDOUT buffering. disable this option if you want to see live progress when you're using output post-processing tools such as tee or kubectl logs πŸ‘€
  • --help β€” show help and exit. classic. 🫢
  • --version β€” show version and exit. also classic. πŸ’œ

πŸ“ ENVIRONMENT πŸ“

this tool does not use any environment variables. that's it. that's the section. πŸŽ€


⭐ SYSTEM REQUIREMENTS ⭐

you need Perl, plus some core packages that ought to be installed in any reasonably new version of Perl. iykyk πŸ’…


πŸ’€ BUGS πŸ’€

for a list of known bugs, see <https://jira.percona.com/projects/PT/issues>.

please report bugs at <https://jira.percona.com/projects/PT>. and please include the following info in your bug report, because otherwise we're all just guessing:

  • complete command-line used to run the tool
  • tool --version
  • MySQL version of all servers involved
  • output from the tool including STDERR
  • input files (log/dump/config files, etc.)

if possible, include debugging output by running the tool with PTDEBUG; see "ENVIRONMENT". (and yes, go read "ATTENTION" below before you do that, okay? 😭)


πŸ™ˆ ATTENTION πŸ™ˆ

using PTDEBUG might expose passwords. when debug is enabled, all command line parameters are shown in the output. like, all of them. the whole thing. so be careful, fr fr. πŸ”΄

🌈 DOWNLOADING 🌈

visit <http://www.percona.com/software/percona-toolkit/> to download the latest release of Percona Toolkit. or, get the latest release straight from the command line:

wget percona.com/get/percona-toolkit.tar.gz
wget percona.com/get/percona-toolkit.rpm
wget percona.com/get/percona-toolkit.deb

you can also get individual tools from the latest release:

wget percona.com/get/TOOL

just replace TOOL with the name of any tool. slay 🧚


πŸ’– AUTHORS πŸ’–

Baron Schwartz, Brian Fraser, and Daniel Nichter β€” icons, all of them πŸ‘‘


🌸 ABOUT PERCONA TOOLKIT 🌸

this tool is part of Percona Toolkit β€” a collection of advanced command-line tools for MySQL developed by Percona. Percona Toolkit was forked from two projects in June, 2011: Maatkit and Aspersa. those projects were created by Baron Schwartz and primarily developed by him and Daniel Nichter. visit <http://www.percona.com/software/> to learn about other free, open-source software from Percona. πŸ¦‹


this program is copyright 2011-2026 Percona LLC and/or its affiliates, 2010-2011 Baron Schwartz.

THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2; OR the Perl Artistic License. on UNIX and similar systems, you can issue man perlgpl or man perlartistic to read these licenses.

you should have received a copy of the GNU General Public License, version 2 along with this program; if not, see <https://www.gnu.org/licenses/>.


⭐ VERSION ⭐

pt-align 3.7.1-4


aaaand that's the whole page, bestie πŸ’œ it was rendered with perl v5.42.2 and dated 2026-09-01 β€” so yeah, go align some columns, you're gonna do great. mwah 🫢✨

πŸ“¦ where this page comes from