public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Raspl <raspl@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, pbonzini@redhat.com
Subject: [PATCH 0/7] tools/kvm_stat: add logfile support
Date: Fri,  6 Mar 2020 12:42:43 +0100	[thread overview]
Message-ID: <20200306114250.57585-1-raspl@linux.ibm.com> (raw)

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

-- 
2.17.1


             reply	other threads:[~2020-03-06 11:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 11:42 Stefan Raspl [this message]
2020-03-06 11:42 ` [PATCH 1/7] tools/kvm_stat: rework command line sequence and message texts Stefan Raspl
2020-03-06 11:42 ` [PATCH 2/7] tools/kvm_stat: switch to argparse Stefan Raspl
2020-03-06 11:42 ` [PATCH 3/7] tools/kvm_stat: add command line switch '-s' to set update interval Stefan Raspl
2020-03-06 11:42 ` [PATCH 4/7] tools/kvm_stat: add command line switch '-c' to log in csv format Stefan Raspl
2020-03-06 11:42 ` [PATCH 5/7] tools/kvm_stat: add rotating log support Stefan Raspl
2020-03-06 11:42 ` [PATCH 6/7] tools/kvm_stat: add command line switch '-T' Stefan Raspl
2020-03-06 11:42 ` [PATCH 7/7] tools/kvm_stat: add sample systemd unit file Stefan Raspl
2020-03-29 11:22   ` Stefan Raspl
2020-03-19 11:21 ` [PATCH 0/7] tools/kvm_stat: add logfile support Stefan Raspl
2020-03-19 11:54 ` Paolo Bonzini
2020-03-23  9:58   ` Stefan Raspl
2020-03-23 10:12     ` Paolo Bonzini
2020-03-24  8:26       ` Stefan Raspl
2020-03-24 10:32         ` Paolo Bonzini
2020-03-29 11:22           ` Stefan Raspl
2020-03-30 10:43             ` Paolo Bonzini
2020-03-30 12:24               ` Stefan Raspl
2020-03-30 12:35                 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200306114250.57585-1-raspl@linux.ibm.com \
    --to=raspl@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox