| 2c1b5434 | 07-Nov-2022 |
Rong Tao <rongtao@cestc.cn> |
tools/kvm_stat: update exit reasons for vmx/svm/aarch64/userspace
Update EXIT_REASONS from source, including VMX_EXIT_REASONS, SVM_EXIT_REASONS, AARCH64_EXIT_REASONS, USERSPACE_EXIT_REASONS.
Signed
tools/kvm_stat: update exit reasons for vmx/svm/aarch64/userspace
Update EXIT_REASONS from source, including VMX_EXIT_REASONS, SVM_EXIT_REASONS, AARCH64_EXIT_REASONS, USERSPACE_EXIT_REASONS.
Signed-off-by: Rong Tao <rongtao@cestc.cn> Message-Id: <tencent_00082C8BFA925A65E11570F417F1CD404505@qq.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 997b7e98 | 02-Apr-2020 |
Stefan Raspl <raspl@de.ibm.com> |
tools/kvm_stat: add sample systemd unit file
Add a sample unit file as a basis for systemd integration of kvm_stat logs.
Signed-off-by: Stefan Raspl <raspl@de.ibm.com> Message-Id: <20200402085705.6
tools/kvm_stat: add sample systemd unit file
Add a sample unit file as a basis for systemd integration of kvm_stat logs.
Signed-off-by: Stefan Raspl <raspl@de.ibm.com> Message-Id: <20200402085705.61155-4-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 3754afe7 | 02-Apr-2020 |
Stefan Raspl <raspl@de.ibm.com> |
tools/kvm_stat: Add command line switch '-L' to log to file
To integrate with logrotate, we have a signal handler that will re-open the logfile. Assuming we have a systemd unit file with ExecSt
tools/kvm_stat: Add command line switch '-L' to log to file
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 <raspl@de.ibm.com> Message-Id: <20200402085705.61155-3-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 0c794dce | 06-Mar-2020 |
Stefan Raspl <raspl@de.ibm.com> |
tools/kvm_stat: add command line switch '-c' to log in csv format
Add an alternative format that can be more easily used for further processing later on. Note that we add a timestamp in the first co
tools/kvm_stat: add command line switch '-c' to log in csv format
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 <raspl@linux.ibm.com> Message-Id: <20200306114250.57585-5-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 3cbb394d | 06-Mar-2020 |
Stefan Raspl <raspl@de.ibm.com> |
tools/kvm_stat: add command line switch '-s' to set update interval
This now controls both, the refresh rate of the interactive mode as well as the logging mode. Which, as a consequence, means that
tools/kvm_stat: add command line switch '-s' to set update interval
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 <raspl@linux.ibm.com> Message-Id: <20200306114250.57585-4-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 0e6618fb | 06-Mar-2020 |
Stefan Raspl <raspl@de.ibm.com> |
tools/kvm_stat: switch to argparse
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 mo
tools/kvm_stat: switch to argparse
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 <raspl@linux.ibm.com> Message-Id: <20200306114250.57585-3-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| c012a0f2 | 24-Aug-2018 |
Stefan Raspl <stefan.raspl@de.ibm.com> |
tools/kvm_stat: re-animate display of dead guests
When filtering by guest (interactive commands 'p'/'g'), and the respective guest was destroyed, detect when the guest is up again through the guest
tools/kvm_stat: re-animate display of dead guests
When filtering by guest (interactive commands 'p'/'g'), and the respective guest was destroyed, detect when the guest is up again through the guest name if possible. I.e. when displaying events for a specific guest, it is not necessary anymore to restart kvm_stat in case the guest is restarted.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
| 404517e4 | 24-Aug-2018 |
Stefan Raspl <stefan.raspl@de.ibm.com> |
tools/kvm_stat: indicate dead guests as such
For destroyed guests, kvm_stat essentially freezes with the last data displayed. This is acceptable for users, in case they want to inspect the final dat
tools/kvm_stat: indicate dead guests as such
For destroyed guests, kvm_stat essentially freezes with the last data displayed. This is acceptable for users, in case they want to inspect the final data. But it looks a bit irritating. Therefore, detect this situation and display a respective indicator in the header.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
| 29c39f38 | 24-Aug-2018 |
Stefan Raspl <stefan.raspl@de.ibm.com> |
tools/kvm_stat: handle guest removals more gracefully
When running with the DebugFS provider, removal of a guest can result in a negative CurAvg/s, which looks rather confusing. If so, suppress the
tools/kvm_stat: handle guest removals more gracefully
When running with the DebugFS provider, removal of a guest can result in a negative CurAvg/s, which looks rather confusing. If so, suppress the body refresh and print a message instead. To reproduce, have at least one guest A completely booted. Then start another guest B (which generates a huge amount of events), then destroy B. On the next refresh, kvm_stat should display a whole lot of negative values in the CurAvg/s column.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
| 0db8b310 | 24-Aug-2018 |
Stefan Raspl <stefan.raspl@de.ibm.com> |
tools/kvm_stat: don't reset stats when setting PID filter for debugfs
When setting a PID filter in debugfs, we unnecessarily reset the statistics, although there is no reason to do so. This behavior
tools/kvm_stat: don't reset stats when setting PID filter for debugfs
When setting a PID filter in debugfs, we unnecessarily reset the statistics, although there is no reason to do so. This behavior was merely introduced with commit 9f114a03c6854f "tools/kvm_stat: add interactive command 'r'", most likely to mimic the behavior of the tracepoints provider in this respect. However, there are plenty of differences between the two providers, so there is no reason not to take advantage of the possibility to filter by PID without resetting the statistics.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
| 710ab11a | 24-Aug-2018 |
Stefan Raspl <stefan.raspl@de.ibm.com> |
tools/kvm_stat: fix updates for dead guests
With pid filtering active, when a guest is removed e.g. via virsh shutdown, successive updates produce garbage. Therefore, we add code to detect this case
tools/kvm_stat: fix updates for dead guests
With pid filtering active, when a guest is removed e.g. via virsh shutdown, successive updates produce garbage. Therefore, we add code to detect this case and prevent further body updates. Note that when displaying the help dialog via 'h' in this case, once we exit we're stuck with the 'Collecting data...' message till we remove the filter.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|