Databases Reference
In-Depth Information
Next, type the column's header, which will appear at the top of the column ( Fig-
ure 16-7 ). Finally, choose the column's source. This is an expression that innotop
compiles into a function internally. You can use names from SHOW VARIABLES and SHOW
STATUS as though they're variables in an equation. We use some parentheses and Perl-
ish “or” defaults to prevent division by zero, but otherwise this equation is pretty
straightforward. We also use an innotop transformation called percent() to format the
resulting column as a percentage; check the innotop documentation for more on that.
Figure 16-8 shows the expression.
Figure 16-7. Adding a header (text for column)
Figure 16-8. Adding a header (expression to calculate)
Press Enter, and you'll see the table definition just as before, but with the new column
added at the bottom. Press the + key a few times to move it up the list, next to the
key_buffer_hit column, and then press q to exit the table editor. Voilà : your new col-
umn, nestled between KCacheHit and BpsIn ( Figure 16-9 ). It's easy to customize
innotop to monitor what you want. You can even write plugins if it really can't do what
you need. There's more documentation at http://code.google.com/p/innotop/ .
Figure 16-9. Adding a header (result)
 
Search WWH ::




Custom Search