Commit c6bad09
pmstat: add -C/--compact mode to hide unavailable metrics
This change adds optional dynamic column hiding to pmstat, allowing it
to automatically suppress columns for metrics that are unavailable on
the current platform.
This is particularly useful for macOS and other platforms where some
Linux-specific metrics (like swap in/out, buffer memory, etc.) don't
exist. Instead of showing "?" for missing values, the columns are
simply not displayed.
Usage:
pmstat # Default: show all columns (original behavior)
pmstat -C # Compact: hide unavailable metric columns
Note: This commit is part of separating cross-platform tool improvements
from platform-specific PMDA enhancements. Darwin PMDA swap metrics have
been split into a separate PR for the macOS-specific enhancement branch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 82b1752 commit c6bad09
1 file changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
439 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
440 | 460 | | |
441 | 461 | | |
442 | 462 | | |
| |||
766 | 786 | | |
767 | 787 | | |
768 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
769 | 792 | | |
770 | 793 | | |
771 | 794 | | |
| |||
0 commit comments