Skip to content

Support standard vmstat output without -a flag#1

Open
nikfot wants to merge 3 commits into
mainfrom
feature/auto-detect-vmstat-columns
Open

Support standard vmstat output without -a flag#1
nikfot wants to merge 3 commits into
mainfrom
feature/auto-detect-vmstat-columns

Conversation

@nikfot

@nikfot nikfot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Auto-detect vmstat column headers from the log file instead of hardcoding the column order
  • Adds support for standard vmstat output (buff/cache columns) alongside the existing vmstat -a format (inact/active columns)
  • Memory plotting adapts dynamically to show whichever columns are present

Changes

  • parser.py: Parser now reads the header line (r b swpd free buff cache ...) and detects the vmstat format automatically
  • timeseries.py: commit_raw_data() accepts a dynamic headers list; added buff_memory_kb and cache_memory_kb attributes; COLUMN_TO_ATTR mapping extracted as module-level constant
  • visualizer.py: Added buff and cache to --column choices
  • Added examples/example_standard.log as a test fixture for standard vmstat format

Test plan

  • Verified parsing of existing example.log (vmstat -a format) still works
  • Verified parsing of new example_standard.log (standard vmstat format) correctly detects buff/cache
  • Manual test: vmstat-visualizer visualize examples/example_standard.log

nikfot added 3 commits May 16, 2026 09:32
Auto-detect vmstat column headers from the log file instead of
hardcoding the column order. This adds support for standard vmstat
output (buff/cache columns) alongside the existing vmstat -a format
(inact/active columns).

- Parser reads the header line and detects available columns
- Timeseries.commit_raw_data() accepts a dynamic headers list
- Memory plotting adapts to show buff/cache or inact/active
- Add buff/cache to CLI --column choices
- Add example_standard.log fixture for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant