All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Raspl <raspl@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Subject: [PATCH 3/3] tools/kvm_stat: add sample systemd unit file
Date: Tue, 31 Mar 2020 22:00:42 +0200	[thread overview]
Message-ID: <20200331200042.2026-4-raspl@linux.ibm.com> (raw)
In-Reply-To: <20200331200042.2026-1-raspl@linux.ibm.com>

From: Stefan Raspl <raspl@de.ibm.com>

Add a sample unit file as a basis for systemd integration of kvm_stat
logs.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
---
 tools/kvm/kvm_stat/kvm_stat.service | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 tools/kvm/kvm_stat/kvm_stat.service

diff --git a/tools/kvm/kvm_stat/kvm_stat.service b/tools/kvm/kvm_stat/kvm_stat.service
new file mode 100644
index 000000000000..71aabaffe779
--- /dev/null
+++ b/tools/kvm/kvm_stat/kvm_stat.service
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+[Unit]
+Description=Service that logs KVM kernel module trace events
+Before=qemu-kvm.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/kvm_stat -dtcz -s 10 -L /var/log/kvm_stat.csv
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+SyslogIdentifier=kvm_stat
+SyslogLevel=debug
+
+[Install]
+WantedBy=multi-user.target
-- 
2.17.1


      parent reply	other threads:[~2020-03-31 20:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 20:00 [PATCH 0/3] tools/kvm_stat: add logfile support Stefan Raspl
2020-03-31 20:00 ` [PATCH 1/3] tools/kvm_stat: add command line switch '-z' to skip zero records Stefan Raspl
2020-03-31 21:45   ` Paolo Bonzini
2020-04-01  8:19     ` Stefan Raspl
2020-04-01 13:23       ` Paolo Bonzini
2020-03-31 20:00 ` [PATCH 2/3] tools/kvm_stat: Add command line switch '-L' to log to file Stefan Raspl
2020-03-31 21:02   ` Paolo Bonzini
2020-04-01 12:59     ` Stefan Raspl
2020-04-01 13:24       ` Paolo Bonzini
2020-03-31 20:00 ` Stefan Raspl [this message]

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=20200331200042.2026-4-raspl@linux.ibm.com \
    --to=raspl@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.