Showing entries 1 to 2
Displaying posts with tag: mext (reset)
Using mext to format saved mysqladmin output nicely

I wrote a while ago about how mext works — it runs “mysqladmin extended-status” and formats it nicely. But what if you want to use it to format saved output that you’ve put into a file? It’s actually very easy. You can tell it what command-line to run to generate its input. By default you are probably going to tell it to run “mysqladmin ext -ri10″ or something like that, but you can just as easily make it run “cat my-saved-output”.

Let’s see how this can be useful. Imagine I have a server that stalls every now and then, and I’ve set up mk-loadavg to watch for this and capture information about system activity with a script that contains

$ mysqladmin ext -c 30 -i1 > mysqladmin-output.txt

That’ll gather 30 samples one second apart. Now I’ll format it:

$ wget -q …
[Read more]
A tweak to column alignment for the mext script

I tweaked the mext script so it auto-detects the necessary column widths for each sample.

Get mext here.

Showing entries 1 to 2