tools/kvm_stat: add logfile support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | tools/kvm_stat: rework command line sequence and message textstools/ tools/ | +25 | 0 replies | |
| 2/7 | tools/kvm_stat: switch to argparsetools/ | +62 | 0 replies | |
| 3/7 | tools/kvm_stat: add command line switch '-s' to set update intervaltools/ tools/ | +38 | 0 replies | |
| 4/7 | tools/kvm_stat: add command line switch '-c' to log in csv formattools/ tools/ | +53 | 0 replies | |
| 5/7 | tools/kvm_stat: add rotating log supporttools/ tools/ | +126 | 0 replies | |
| 6/7 | tools/kvm_stat: add command line switch '-T'tools/ tools/ | +78 | 0 replies | |
| 7/7 | tools/kvm_stat: add sample systemd unit filetools/ | +15 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] tools/kvm_stat: add logfile support
This patch series provides a couple of new options to make logging to files feasible.
Specifically, we add command line switches to specify an arbitrary time interval for logging, and to toggle between a .csv and the previous file format. Furthermore, we allow logging to files, where we utilize a rotating set of 6 logfiles, each with its own header for easy post- processing, especially when using .csv format.
Since specifying logfile size limits might be a non-trivial exercise, we're throwing in yet another command line option that allows to specify the minimum timeframe that should be covered by logs. Finally, there's a minimal systemd unit file to deploy kvm_stat-based logging in Linux distributions.
Note that the decision to write our own logfiles rather than to log to e.g. systemd journal is a conscious one: It is effectively impossible to write csv records into the systemd journal, the header will either disappear after a while or has to be repeated from time to time, which defeats the purpose of having a .csv format that can be easily post- processed, etc.
See individual patch description for further details.
Stefan Raspl (7):
tools/kvm_stat: rework command line sequence and message texts tools/kvm_stat: switch to argparse
tools/kvm_stat: add command line switch '-s' to set update interval tools/kvm_stat: add command line switch '-c' to log in csv format tools/kvm_stat: add rotating log support
tools/kvm_stat: add command line switch '-T' tools/kvm_stat: add sample systemd unit file
tools/kvm/kvm_stat/kvm_stat | 434 +++++++++++++++++++++------- tools/kvm/kvm_stat/kvm_stat.service | 15 + tools/kvm/kvm_stat/kvm_stat.txt | 59 ++-- 3 files changed, 384 insertions(+), 124 deletions(-) create mode 100644 tools/kvm/kvm_stat/kvm_stat.service
Signature · 1 line
2.17.1