a013bd2f | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Add optparse description
Added a description text that explains what the script does and which requirements have to be met to let it run.
The help formatter class is needed as
scripts/kvm/kvm_stat: Add optparse description
Added a description text that explains what the script does and which requirements have to be met to let it run.
The help formatter class is needed as the default optparse formatter makes the text unreadable.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-35-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
7f786a9a | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Add interactive filtering
Interactively changing the filter is much more useful than the drilldown, because it is more versatile.
With this patch, the filter can be changed by
scripts/kvm/kvm_stat: Add interactive filtering
Interactively changing the filter is much more useful than the drilldown, because it is more versatile.
With this patch, the filter can be changed by pressing 'f' in the text ui and entering a new filter regex.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-34-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
126b33e6 | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Fixup filtering
When filtering, the group leader event should not be disabled, as all other events under it will also be disabled. Also we should make sure that values from dis
scripts/kvm/kvm_stat: Fixup filtering
When filtering, the group leader event should not be disabled, as all other events under it will also be disabled. Also we should make sure that values from disabled fields will not be displayed.
This also filters the fields from the log and batch output for better readability.
Also the drilldown update now directly checks for the stats' field filter and (un)sets drilldown accordingly.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-33-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
1cd55f9d | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Fix rlimit for unprivileged users
Setting the hard limit as a unprivileged user either returns an error when it is higher than the current one or irreversibly sets it lower.
T
scripts/kvm/kvm_stat: Fix rlimit for unprivileged users
Setting the hard limit as a unprivileged user either returns an error when it is higher than the current one or irreversibly sets it lower.
Therefore we leave the hardlimit untouched as long as we don't need to raise it as this needs CAP_SYS_RESOURCE.
This gives admins the possibility to run the script as an unprivileged user to increase security.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-32-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
d8e44802 | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Read event values as u64
The struct read_format, which denotes the returned values on a read states that the values are u64 and not long long which is used for struct unpacking
scripts/kvm/kvm_stat: Read event values as u64
The struct read_format, which denotes the returned values on a read states that the values are u64 and not long long which is used for struct unpacking.
Therefore the 'q' long long formatter was exchanged with 'Q' which is the format for u64 data.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-31-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
00842aac | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr
All initializations of the ctypes struct that don't need additional information were moved to its init method. The unneeded initializations
scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr
All initializations of the ctypes struct that don't need additional information were moved to its init method. The unneeded initializations for sample_type and sample_period were removed as they do not affect the counters that are read.
This improves readability of the setup_event_attribute by halfing its LOC.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-30-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
c887d9a2 | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Fix output formatting
The key names in log mode were capped to 10 characters which is not enough for distinguishing between keys. Capping was therefore removed.
In batch mode
scripts/kvm/kvm_stat: Fix output formatting
The key names in log mode were capped to 10 characters which is not enough for distinguishing between keys. Capping was therefore removed.
In batch mode the spacing between keys and values was too narrow and therefore had to be extended to 42.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-29-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
8a2a3331 | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Make tui function a class
The tui function itself had a few sub-functions and therefore basically already was class-like. Making it an actual one with proper methods improved r
scripts/kvm/kvm_stat: Make tui function a class
The tui function itself had a few sub-functions and therefore basically already was class-like. Making it an actual one with proper methods improved readability.
The curses wrapper was dropped in favour of __entry/exit__ methods that implement the same behaviour.
Also renamed single character variable name, so the name reflects the content.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-28-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
9c0ab054 | 11-Jan-2016 |
Janosch Frank <frankja@linux.vnet.ibm.com> |
scripts/kvm/kvm_stat: Remove unneeded X86_EXIT_REASONS
The architecture detection method directly accesses vmx and smv exit reason constants. Therefore we don't need it anymore.
Signed-off-by: Jano
scripts/kvm/kvm_stat: Remove unneeded X86_EXIT_REASONS
The architecture detection method directly accesses vmx and smv exit reason constants. Therefore we don't need it anymore.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-27-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|