Redesign pt-summary
1. Use mktemp, and separate the collection and reporting
Use mktemp to create a temporary directory. Write all samples of output into this directory, and separate the collect and report steps of the tool. The collect stage should simply fill the directory with files, and the report stage should just look at the directory and format a report from it. Make these into separate functions so they can be executed separately. Write tests for the report portion of it. Remove the temporary directory at the end of execution, unless the --tempdir option is given, in which case, the tool should fill the directory with collected data, report, and then save the temporary directory.
2. Report OS-level tuning parameters on important processes
Find the oom_adj value of sshd, and report it. Report if any process is oom_adj'd to -17.
3. Make the tool use long-form command-line options
The tool should accept the standard options:
--config
--help
--sleep how long to sleep for generating "vmstat" output (default 5s)
--tempdir (no default)
--version
4. Determine whether anything from Google Code needs attention
The Google Code project for Aspersa has a lot of requests for the "summary" tool, which is this tool's ancestor. Determine whether any bugs or feature requests are worth addressing, and update this spec. See http://
5. Improve support for network devices
Use ethtool when available to report on the speed and duplex status (half/full) of each network device (note that device != interface; here we want to report on physical devices)
6. Show amount of configured swap space
Requested by Peter:
# Memory #######
Total | 11.72G
Free | 2.26G
Used | physical = 9.47G, swap = 0.00k, virtual = 9.47G
Buffers | 131.29M
Caches | 7.36G
Dirty | 6356 kB
UsedRSS | 2.5G
Currently it just shows how much swap is used but not configured.
7. Logical volume group free space
Requested by Peter:
I noticed it does NOT show whenever there is any free space is available at volume group:
# LVM Volumes #######
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
backup data -wi-ao 320.00G
mysql data -wi-ao 140.00G
www data -wi-ao 50.00G
It would be good to get it from vgdisplay:
$ vgdisplay
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 481
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 533.89 GB
PE Size 4.00 MB
Total PE 136677
Alloc PE / Size 130560 / 510.00 GB
Free PE / Size 6117 / 23.89 GB
Blueprint information
- Status:
- Complete
- Approver:
- Baron Schwartz
- Priority:
- Essential
- Drafter:
- Baron Schwartz
- Direction:
- Needs approval
- Assignee:
- Brian Fraser
- Definition:
- Approved
- Series goal:
- Accepted for 2.1
- Implementation:
- Implemented
- Milestone target:
- 2.1.1
- Started by
- Brian Fraser
- Completed by
- Daniel Nichter