Commit Graph

35 Commits

Author SHA1 Message Date
Siglen
b7807d0195 dbginfo.sh: Add KVM commands and rework data collection
Add virsh commands for KVM debug data collection and rework the domain
data collection and step numbering. Update the man page accordingly.

[hoeppner@linux.ibm.com: Reword commit message]
Signed-off-by: Joern Siglen <siglen@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-05-20 18:49:44 +02:00
Siglen
302cd4ed7e dbginfo.sh: fix typo
Signed-off-by: Joern Siglen <siglen@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-05-20 18:49:44 +02:00
Mario Held
eb1fd47a85 dbginfo: Added and removed commands
Added kallsyms and lscpu -ye, added vmcp commands
q memassist, q pcifunction, q vmrelocate and removed q cache

Signed-off-by: Mario Held <mario.held@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-03-16 17:18:51 +01:00
Steffen Maier
4fc1a92a8d zfcpdbf: deal with crash 7.2.9 change in caller name formatting
Since crash 7.2.9 commit
f1f43bf355
in support of kernel v5.9 commit 0990d836cecb
("s390/debug: debug feature version 3"),
the symbolic caller function name is left aligned instead of right
aligned, so now we alternatively have to remove whitespace between
function name and offset.

Otherwise, zfcpdbf output contains wrong warnings about ambiguous payload
records with wrong values for reqid and area, as well as incorrectly
decoded trace records with wrong content values and potential error
messages on not defined record id, and finally a potential list of
occurrences of unknown tags which should empty:

Loading trace records ...(this might take a while)
Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:V^D^@fcp_
Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:W^D^@fsf_
Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:i^B^@san_

...

Timestamp      : ...
Area           : SAN
Subarea        : 00
Level          : 1
Exception      : -
CPU ID         : 0001
Caller         : <zfcp_dbf_san_in_els
Record ID      : 0
Tag            : 6^B^Cfcie
Request ID     : >>>wrong<<<
Destination ID : >>>wrong<<<
SAN record id=0 not defined.
Timestamp      : ...
Area           : SAN
Subarea        : 00
Level          : 1
Exception      : -
CPU ID         : 0002
Caller         : <zfcp_dbf_san_in_els
Record ID      : 0
Tag            : 6^B^Cfcie
Request ID     : >>>wrong<<<
Destination ID : >>>wrong<<<
SAN record id=0 not defined.

...

occurrences of unknown tags:
...

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-02-19 13:46:54 +01:00
Philipp Kern
8898650266 scripts/zipl-switch-to-blscfg.1: Fix some typos
Closes: https://github.com/ibm-s390-tools/s390-tools/pull/90
Signed-off-by: Philipp Kern <pkern@google.com>
Acked-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-11-11 14:25:46 +01:00
Sa Liu
c31eba5e00 dbginfo: Added collection of /proc/softirqs
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-07-17 17:55:39 +02:00
Julian Wiedmann
f742ed73e1 dbginfo: gather ethtool output for per-queue coalescing
Some drivers provide per-queue IRQ coalescing information, collect it.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-03-16 13:41:43 +01:00
Jens Remus
fbf8513d43 zfcpdbf: print HBA FC Endpoint Security trace records
Format and print HBA FC Endpoint Security trace records with a record ID
of ZFCP_DBF_HBA_FCES (5). Align output to the one of FSF response trace
records for readability. Note that the FSF protocol status is most likely
FSF_PROT_GOOD (0x00000001).

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-03-16 13:39:10 +01:00
Julian Wiedmann
4fa9656613 dbginfo: collect softnet_stat
This can be helpful when diagnosing network performance issues.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-03-02 14:26:30 +01:00
Sa Liu
d415b8efed dbginfo: Removed collection of /var/log/opencryptoki/
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-02-27 13:44:46 +01:00
Julian Wiedmann
0652c687e3 dbginfo: collect bridge data
This can be helpful in diagnosing network-related issues.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-01-08 15:00:11 +01:00
Sa Liu
235e997a77 dbginfo: journalctl from the current system time with more number of lines and precise timestamp
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-12-12 18:04:32 +01:00
Sa Liu
c079e48d7d dbginfo: Collect all files under /usr/lib/systemd/system/
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-12-12 18:04:32 +01:00
Julian Wiedmann
125df52887 dbginfo: collect qdisc statistics
This can be helpful in diagnosing network-related issues.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-10-17 16:35:01 +02:00
Julian Wiedmann
852fb9dfb8 dbginfo: collect extended network interface statistics
The basic statistics are already collected via ifconfig. But that tool
is deprecated, and provides no way of collecting the extended stats.
So also gather data from 'ip link'.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-10-17 16:35:01 +02:00
Sa Liu
7a2a96e8a3 dbginfo: add hyptop output for z/VM and LPAR.
Signed-off-by: Sa Liu <saliu@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-18 12:55:17 +02:00
Ursula Braun
e6a3b18104 dbginfo.sh: add ethtool output
This patch adds ethtool commands for network interfaces.
Especially the offload settings are important.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Ursula Braun
36292cb166 dbginfo.sh: add lspci and smc output
This patch adds the base lspci command to list pci devices
and the smc_dbg command from the smc-tools package to show
SMC socket related information.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Steffen Maier
d8c630e5f4 zfcpdbf: warn about ambiguous payload records with dup reqid & payarea
Function get_payload_records() reading from disk, blindly adds payload
record (junks) to a list in a 2-stage hierarchical hash keyed with
request ID and PAY area.

On adapter offline/online, zfcp resets the request ID to re-start with 1.
Hence it's not a unique foreign key in the lifetime of the PAY area.

The last payload record (junks) read for the same request ID and PAY area
is the one printed as named PAY field in the tool output.
This is not necessarily the chronologically last record due to PAY area
wrapping.

With this workaround, we:
* warn on reading PAY records if ambiguous entries occurred,
* print additional PAY timestamps which the user can compare
  with the actual trace record timestamps to determine if they are close
  enough to indicate a match.

We only found this by accident because we kept "short" "payload" being a
built-in part of some actual trace record types in areas HBA, SAN, SCSI.
For above cases, the full PAYload did not match the
built-in "short" "payload".

While at it, also add a comment that PAY output can also be wrong
in another case when junks of multi-part PAY records are missing due
to PAY area wrapping.

Below is an abbreviated example output with this workaround:

Loading trace records ...(this might take a while)
Warning: Ambiguous PAYload records. reqid:0000000000000037 area:san_res

...

Timestamp      : 2017-07-07-18:01:34:574827
Area           : SAN
...
Tag            : fssct_1
Request ID     : 0x0000000000000037
Destination ID : 0x00fffffc
SAN req short  : 01000000 fc020000 01720ffc 00000000
                 00000008
SAN req length : 20

Timestamp      : 2017-07-07-18:01:34:619310         ------------------+
Area           : SAN                                                  |
...                                                                   |
Tag            : fsscth2                                              |
Request ID     : 0x0000000000000037                                   |
Destination ID : 0x00fffffc                                           |
SAN resp short : 01000000 fc020000 80020000 00000000                  |
                 00671a07 00000000 c05076ff d6801850                  |
                 00671a7e 00000000 c05076ff d6801968                  |
SAN resp length: 16384                                                |
Payload time   : 2017-07-07-18:16:17:165708          <== does not match
San resp info  : 01000000 fc020000 80020000 00000000 <== wrong
                 4a49424d 20202020 20323936 34202020 <== wrong
                 20202020 20202020 20303230 30303030 <== wrong
                 30303745 43383720 20504348 49443a20 <== wrong
                 30313938 204e5049 5620556c 7049643a <== wrong
                 20303536 30303330 30202020 00000000 <== wrong
                 00000000 00000000 00000000 00000000 <== wrong
                 ...                                 <== wrong

...

Timestamp      : 2017-07-07-18:16:17:165713
Area           : SAN
...
Tag            : fsscth2
Request ID     : 0x0000000000000037             <== same reqid & pay "area"
Destination ID : 0x00fffffc
SAN resp short : 01000000 fc020000 80020000 00000000
                 4a49424d 20202020 20323936 34202020
                 20202020 20202020 20303230 30303030
SAN resp length: 273
Payload time   : 2017-07-07-18:16:17:165708          <== 2nd & last, match
                                                         close to Timestamp
San resp info  : 01000000 fc020000 80020000 00000000
                 4a49424d 20202020 20323936 34202020
                 20202020 20202020 20303230 30303030
                 30303745 43383720 20504348 49443a20
                 30313938 204e5049 5620556c 7049643a
                 20303536 30303330 30202020 00000000
                 00000000 00000000 00000000 00000000
                 ...

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-05-21 14:16:53 +02:00
Sa Liu
60bda7ed0d dbginfo: Added commmands blockdev and lvdisplay
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-03-21 12:19:12 +01:00
Sa Liu
bbd88f26c9 dbginfo: Redirect output of lsof to a separate file open_files.out
The output of lsof command is sometimes too long and makes it difficult
to search in runtime.out. Move the output to a separate file.

Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-02-15 16:35:47 +01:00
Sa Liu
79bfa818ed dbginfo: Collect traces under /var/log/opencryptoki
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-02-11 12:33:56 +01:00
Dan Horák
847f16f632 Switch to using /run directory instead of the legacy /var/run
Closes: https://github.com/ibm-s390-tools/s390-tools/pull/53
Signed-off-by: Dan Horák <dan@danny.cz>
Acked-by: Sa Liu <saliu@de.ibm.com>
Acked-by: Harald Freudenberger <freude@linux.ibm.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-02-11 12:33:56 +01:00
Javier Martinez Canillas
4951044213 zipl: use the BLS "title" field as the IPL section name
Most bootloaders use the BootLoaderSpec "title" field to name the entries
in their boot menu. The zipl bootloader used the "version" field instead,
since it was wrongly assumed that the zipl boot menu didn't support names
that contained spaces, which are usually present in a BLS "title" field.

But this is not the case, names with space characters are supported by the
IPL and is just a constraint of the section heading in the zipl.conf file.

So to be consistent with all the other bootloaders, use the "title" field
also on zipl when populating the boot menu entries from BLS files.

Closes: https://github.com/ibm-s390-tools/s390-tools/pull/47
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Stefan Haberland sth@linux.ibm.com
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-11-16 15:46:51 +01:00
Sa Liu
d36ff82999 dbginfo: Add VM command query time. Corrected error messages.
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-07-04 13:09:58 +02:00
Javier Martinez Canillas
b8a9f0d1d3 scripts: Add script to switch zipl config to a BootLoaderSpec setup
Add a zipl-switch-to-blscfg script that can be used to switch the zipl
configuration in a system to use the BootLoaderSpec (BLS) config files
to define the IPL sections instead of having them defined in zipl.conf.

Closes: #28
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-06-08 15:03:30 +02:00
Sa Liu
4c401162c0 dbginfo: Add VM commands to query protection settings.
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-05-07 13:42:03 +02:00
Sebastian Ott
b9e47e356b dbginfo: gather nvme related data
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
2018-02-16 10:38:08 +01:00
Dan Horák
05de40cdeb Replace delimiter char in sed expressions
Use a character, that can't be used in rpm Version and Release tag, as
the delimiter in sed expressions.

Fixes: #25

Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2018-01-22 13:50:36 +01:00
Sa Liu
b4868c21bf Add VM command to query processor
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2018-01-22 13:49:02 +01:00
Sa Liu
c21e464856 dbginfo: Show thread with ps command.
Signed-off-by: Sa Liu <saliu@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-11-14 14:38:21 +01:00
Michael Holzheu
70243b8135 cpictl: Make --help/--version help text s390-tools compliant
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-09-22 16:21:44 +02:00
Claudio Imbrenda
2f461f673e cpi: add missing help line
The information shown with the --help option did not mention the -v or
--version option which can be used to retrieve the version information.

This patch fixes it.

Fixes: 7179f5de2a1582 ("cpi: Introduce new udev rule and integrate with systemd unit")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Reference-ID: VS1706
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-09-22 16:21:31 +02:00
Claudio Imbrenda
ca50924acb cpi: Introduce new udev rule and integrate with systemd unit
Add a new udev rule that is triggered when a KVM VM is started
on the system the very first time. This rule reports over the
sysfs CPI kernel interface that the system is a KVM host.

Currently the cpi.service systemd unit already works with
the CPI sysfs interface. Introduce a new internal utility
script "cpictl" that is used by both the udev rule and
the systemd unit to guarantee coordinated access to the
kernel CPU interface.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Reviewed-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-09-15 05:03:04 +02:00
Michael Holzheu
b627b8d8e1 Initial s390-tools-2.0.0 import
This commit is based on the s390-tools-1.39.0 version.

Changes on top of s390-tools-1.39.0:

 - Add MIT license to all source files
 - Add LICENSE file
 - Transform REAMDE to README.md (markdown)
 - Add AUTHORS.md file
 - Add CONTRIBUTING.md file
 - Move changelog from README to CHANGELOG.md file

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 10:55:40 +02:00