Redesign pt-diskstats

Registered by Baron Schwartz

0. Investigate converting to Perl

This tool can be converted to Perl if Term::ReadKey functionality can be done in pure-Perl for the Linux platform (no need for other platforms) and embedded so no external modules are needed.

1. Use mktemp

Create a temporary directory with mktemp and use this to store the file, instead of hardcoding the file into /tmp. Be sure to remove any temp dirs and files created when the tool exits unless it exits on error, in which case any data it was using in its temp dir might help reproduce the problem.

2. Fix accuracy problems

Fix pt-diskstat bugs for https://launchpad.net/percona-toolkit/+milestone/2.0-beta2

3. Add await and svctm columns

Add columns similar to iostat. Rename them, though: await should be called qtime, and svctm should be called stime. These should appear by default.

4. Hide MB/second, show IOs/second

Hide (by default) the MB written/read per second columns, and show the IOPS/second for reads and writes.

5. Make the tool hide inactive devices.

Devices that are just zeroes should not be displayed (by default). This should be enabled/disabled with the 'i' key to match innotop's keystrokes.

6. Add long-form command-line options

Add proper command-line options that comply with our standards, and include --help, --version, and our other standard options.

7. Add configuration file

This will be done automatically once the tool uses OptionParser and is given a --config option (copy it from another Perl tool).

Blueprint information

Status:
Complete
Approver:
Baron Schwartz
Priority:
Essential
Drafter:
Baron Schwartz
Direction:
Approved
Assignee:
Brian Fraser
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2.0.3
Started by
Brian Fraser
Completed by
Brian Fraser

Sprints

Whiteboard

Status of spec implementations:

0. Investigate converting to Perl: DONE
1. Use mktemp:DONE
2. Fix accuracy problems:DONE except for #838939 (can't reproduce)
3. Add await and svctm columns:DONE
4. Hide MB/second, show IOs/second:DONE
5. Make the tool hide inactive devices:DONE
6. Add long-form command-line options:DONE except for --help
7. Add configuration file:DONE

Status of tests:

In progress.

Status of documentation:

Need to be rewritten (by Baron).

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.