<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/kvm, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/kvm?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/kvm?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-10-18T18:07:18Z</updated>
<entry>
<title>KVM: kvm_stat: do not show halt_wait_ns</title>
<updated>2021-10-18T18:07:18Z</updated>
<author>
<name>Christian Borntraeger</name>
<email>borntraeger@de.ibm.com</email>
</author>
<published>2021-10-06T12:17:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=01c7d2672a84dbdfa8050d073c3ea466437578fd'/>
<id>urn:sha1:01c7d2672a84dbdfa8050d073c3ea466437578fd</id>
<content type='text'>
Similar to commit 111d0bda8eeb ("tools/kvm_stat: Exempt time-based
counters"), we should not show timer values in kvm_stat. Remove the new
halt_wait_ns.

Fixes: 87bcc5fa092f ("KVM: stats: Add halt_wait_ns stats for all architectures")
Cc: Jing Zhang &lt;jingzhangos@google.com&gt;
Cc: Stefan Raspl &lt;raspl@de.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20211006121724.4154-1-borntraeger@de.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Fix documentation typo</title>
<updated>2021-05-07T10:06:22Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@linux.ibm.com</email>
</author>
<published>2021-05-06T14:03:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b26990987ffce0525abbd84b36595869cfdbbfe6'/>
<id>urn:sha1:b26990987ffce0525abbd84b36595869cfdbbfe6</id>
<content type='text'>
Makes the dash in front of option '-z' disappear in the generated
man-page.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20210506140352.4178789-1-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Add restart delay</title>
<updated>2021-03-30T17:07:09Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@linux.ibm.com</email>
</author>
<published>2021-03-25T12:29:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=75f94ecbd0dfd2ac4e671f165f5ae864b7301422'/>
<id>urn:sha1:75f94ecbd0dfd2ac4e671f165f5ae864b7301422</id>
<content type='text'>
If this service is enabled and the system rebooted, Systemd's initial
attempt to start this unit file may fail in case the kvm module is not
loaded. Since we did not specify a delay for the retries, Systemd
restarts with a minimum delay a number of times before giving up and
disabling the service. Which means a subsequent kvm module load will
have kvm running without monitoring.
Adding a delay to fix this.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20210325122949.1433271-1-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Exempt time-based counters</title>
<updated>2020-12-12T00:18:51Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-12-08T21:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=111d0bda8eeb4b54e0c63897b071effbf9fd9251'/>
<id>urn:sha1:111d0bda8eeb4b54e0c63897b071effbf9fd9251</id>
<content type='text'>
The new counters halt_poll_success_ns and halt_poll_fail_ns do not count
events. Instead they provide a time, and mess up our statistics. Therefore,
we should exclude them.
Removal is currently implemented with an exempt list. If more counters like
these appear, we can think about a more general rule like excluding all
fields name "*_ns", in case that's a standing convention.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Tested-and-reported-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Message-Id: &lt;20201208210829.101324-1-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: add sample systemd unit file</title>
<updated>2020-04-21T13:13:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-04-02T08:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=997b7e98990cd44243651827e4efa366d9885907'/>
<id>urn:sha1:997b7e98990cd44243651827e4efa366d9885907</id>
<content type='text'>
Add a sample unit file as a basis for systemd integration of kvm_stat
logs.

Signed-off-by: Stefan Raspl &lt;raspl@de.ibm.com&gt;
Message-Id: &lt;20200402085705.61155-4-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Add command line switch '-L' to log to file</title>
<updated>2020-04-21T13:13:12Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-04-02T08:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3754afe7cf7cc3693a9c9ff795e9bd97175ca639'/>
<id>urn:sha1:3754afe7cf7cc3693a9c9ff795e9bd97175ca639</id>
<content type='text'>
To integrate with logrotate, we have a signal handler that will re-open
the logfile.
Assuming we have a systemd unit file with
     ExecStart=kvm_stat -dtc -s 10 -L /var/log/kvm_stat.csv
     ExecReload=/bin/kill -HUP $MAINPID
and a logrotate config featuring
     postrotate
        /bin/systemctl reload kvm_stat.service
     endscript
Then the overall flow will look like this:
(1) systemd starts kvm_stat, logging to A.
(2) At some point, logrotate runs, moving A to B.
    kvm_stat continues to write to B at this point.
(3) After rotating, logrotate restarts the kvm_stat unit via systemctl.
(4) The kvm_stat unit sends a SIGHUP to kvm_stat, finally making it
    switch over to writing to A again.
Note that in order to keep the structure of the cvs output in tact, we
make sure to, in contrast to the standard log format, only write the
header once at the beginning of a file. This implies that the header is
suppressed when appending to an existing file. Unlike with the standard
format, where we append to an existing file by starting out with a
header.

Signed-off-by: Stefan Raspl &lt;raspl@de.ibm.com&gt;
Message-Id: &lt;20200402085705.61155-3-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: add command line switch '-z' to skip zero records</title>
<updated>2020-04-21T13:13:11Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-04-02T08:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=da1fda288943c37de8e1513b98f6dda40c8cd421'/>
<id>urn:sha1:da1fda288943c37de8e1513b98f6dda40c8cd421</id>
<content type='text'>
When running in logging mode, skip records with all zeros (=empty records)
to preserve space when logging to files.

Signed-off-by: Stefan Raspl &lt;raspl@de.ibm.com&gt;
Message-Id: &lt;20200402085705.61155-2-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: add command line switch '-c' to log in csv format</title>
<updated>2020-03-23T19:44:21Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-03-06T11:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0c794dcefbbc6b128f74b4c46c3ef49321d88735'/>
<id>urn:sha1:0c794dcefbbc6b128f74b4c46c3ef49321d88735</id>
<content type='text'>
Add an alternative format that can be more easily used for further
processing later on.
Note that we add a timestamp in the first column for both, the regular
and the new csv format.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20200306114250.57585-5-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: add command line switch '-s' to set update interval</title>
<updated>2020-03-23T19:44:20Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-03-06T11:42:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3cbb394d9fb68dcd20415dce2c42b695475e9684'/>
<id>urn:sha1:3cbb394d9fb68dcd20415dce2c42b695475e9684</id>
<content type='text'>
This now controls both, the refresh rate of the interactive mode as well
as the logging mode. Which, as a consequence, means that the default of
logging mode is now 3s, too (use command line switch '-s' to adjust to
your liking).

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20200306114250.57585-4-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: switch to argparse</title>
<updated>2020-03-23T19:44:20Z</updated>
<author>
<name>Stefan Raspl</name>
<email>raspl@de.ibm.com</email>
</author>
<published>2020-03-06T11:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0e6618fba8c98223e17d57d68b7b834e1eb89612'/>
<id>urn:sha1:0e6618fba8c98223e17d57d68b7b834e1eb89612</id>
<content type='text'>
optparse is deprecated for a while, hence switching over to argparse
(which also works with python2).
As a consequence, help output has some subtle changes, the most
significant one being that the options are all listed explicitly
instead of a universal '[options]' indicator. Also, some of the error
messages are phrased slightly different.
While at it, squashed a number of minor PEP8 issues.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Message-Id: &lt;20200306114250.57585-3-raspl@linux.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
