public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Raspl <raspl@linux.ibm.com>, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com
Subject: Re: [PATCH 0/7] tools/kvm_stat: add logfile support
Date: Mon, 23 Mar 2020 11:12:19 +0100	[thread overview]
Message-ID: <5c350f55-64be-43fc-237d-7f71b4e9afdc@redhat.com> (raw)
In-Reply-To: <d893c37d-705c-b9a1-cf98-db997edf3bce@linux.ibm.com>

On 23/03/20 10:58, Stefan Raspl wrote:
> Thx!
> As for SIGHUP: The problem that I see with logrotate and likewise approaches is
> how the heading is being handled: If it is reprinted every x lines (like the
> original logging format in kvmstat does), then it messes up any chance of
> loading the output in external tools for further processing.
> If the heading is printed once only, then it will get pushed out of the log
> files at some time - which is fatal, since '-f <fields>' allows to specify
> custom fields, so one cannot reconstruct what the fields were.

For CSV output, can't you print the heading immediately after SIGHUP
reopens the files?  (Maybe I am missing something and this is a stupid
suggestion, I don't know).

Paolo

> That's why I did things as I did - which works great for .csv output.
> I'd really like to preserve the use-case where a user has a chance to
> post-process the output, especially .csv, in other tools. So how how about we do
> both, add support for SIGHUP for users who want to use logrotate (I imagine this
> would be used with the original logging format only), and keep the suggested
> support for 'native' log-rotation for .csv users?


  reply	other threads:[~2020-03-23 10:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 11:42 [PATCH 0/7] tools/kvm_stat: add logfile support Stefan Raspl
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 [this message]
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=5c350f55-64be-43fc-237d-7f71b4e9afdc@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=raspl@linux.ibm.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