Flite Careers

Hidden Gems in Percona Toolkit

I use Percona Toolkit a lot. We all know about the most popular tools: pt-heartbeat, pt-kill, pt-online-schema-change, pt-query-digest, pt-stalk, pt-table-checksum, etc. They can help a lot working with MySQL.

But there are also some lesser known tools that don’t have anything to do with MySQL.

Here are a few of my favorites:

pt-price

Percona acknowledges that “PT” doesn’t only stand for “Percona Toolkit”, it is also the chemical symbol for Platinum, so they recently added this handy little tool to give you the current spot price for Platinum. The price of Platinum is changing all the time, and it’s hard to keep up with it. Also, currency exchange rates are constantly fluctuating, so figuring out the value of platinum in various currencies is almost impossible. That’s where pt-price comes in. For example, say you want to know the price of Platinum in Euros per kilo or US dollars per ounce right now. Just run one of these commands:

1
2
3
4
5
$ pt-price --currency=euro --unit=kilogram
39586.26

$ pt-price --currency=usd --unit=ounce
1586

pt-height

We all know that the Petronas Towers in Kuala Lumpur are 1483 feet tall, but how many meters is that? How about furlongs? pt-height can tell you:

1
2
3
4
5
$ pt-height --unit=meter
451.9

$ pt-height --unit=furlong
2.247

The Petronas Towers haven’t been the tallest buildings in the world since 2004, but where do they rank right now? pt-height can tell you:

1
2
$ pt-height --rank
7

pt-barnum

I haven’t used this one much yet, so I’ll leave this as an excercise for the reader.


Comments