mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Compare commits
232 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8d0fca36c | ||
|
|
bbd88f26c9 | ||
|
|
79bfa818ed | ||
|
|
299144264d | ||
|
|
a69470d7e0 | ||
|
|
b26dbfe832 | ||
|
|
d95dc6d698 | ||
|
|
847f16f632 | ||
|
|
bc053a975a | ||
|
|
e9c030f202 | ||
|
|
dffd41943e | ||
|
|
58189b8786 | ||
|
|
b165500b69 | ||
|
|
5f2ddad6a8 | ||
|
|
28deb03178 | ||
|
|
8f1fa2a83c | ||
|
|
7677d3c0b4 | ||
|
|
6f7cb68dcf | ||
|
|
4d008849f7 | ||
|
|
d921c230ab | ||
|
|
6151889dcd | ||
|
|
224dc2e414 | ||
|
|
5a10aa73a9 | ||
|
|
428d41034e | ||
|
|
cf265cc46a | ||
|
|
84623f39dc | ||
|
|
8cbdfebc4f | ||
|
|
4951044213 | ||
|
|
667516681e | ||
|
|
10ce432196 | ||
|
|
320a49fc1a | ||
|
|
f0d18ddf2b | ||
|
|
2962248e7b | ||
|
|
773c8672ac | ||
|
|
637750f299 | ||
|
|
a17b52a043 | ||
|
|
d14051e309 | ||
|
|
d85cf20981 | ||
|
|
7df8edd88a | ||
|
|
6d382d30d9 | ||
|
|
9f8d245f92 | ||
|
|
cf39f26dee | ||
|
|
83106991ab | ||
|
|
b631c74df5 | ||
|
|
c675096899 | ||
|
|
5a9e93fb5b | ||
|
|
aefc8cd3ff | ||
|
|
a208463e49 | ||
|
|
a931428908 | ||
|
|
c2297a0a7e | ||
|
|
70a79fab3c | ||
|
|
b5a7b13e71 | ||
|
|
52b2cb8424 | ||
|
|
03b2bf028b | ||
|
|
81f9a67d6f | ||
|
|
c15f481181 | ||
|
|
4170cceb52 | ||
|
|
a648dbb014 | ||
|
|
322d51e5e4 | ||
|
|
a1db08160d | ||
|
|
31b77e1646 | ||
|
|
a4acf7c991 | ||
|
|
17cade6e7f | ||
|
|
90ea5d9e5d | ||
|
|
6accffd583 | ||
|
|
4e5afb9b71 | ||
|
|
9f247795f3 | ||
|
|
71976f8e4b | ||
|
|
851f685993 | ||
|
|
9100327092 | ||
|
|
e2d433bb10 | ||
|
|
d6925a30da | ||
|
|
fe4cc7c479 | ||
|
|
fa3cabc8af | ||
|
|
5a9b56f814 | ||
|
|
20145b6d06 | ||
|
|
9561a0b983 | ||
|
|
97fa88299f | ||
|
|
aaaebb2030 | ||
|
|
ff2a403bd2 | ||
|
|
66ed1727f9 | ||
|
|
c33cc5a619 | ||
|
|
cd46297d7c | ||
|
|
07b11982e3 | ||
|
|
35348c302b | ||
|
|
35312d0c47 | ||
|
|
342c6a3707 | ||
|
|
e2a8d85916 | ||
|
|
8f0496b26a | ||
|
|
d03be73536 | ||
|
|
a87268d62e | ||
|
|
9cc06a0529 | ||
|
|
3b1ccce515 | ||
|
|
ffe91d1b30 | ||
|
|
f35c5d01fd | ||
|
|
b23c35c390 | ||
|
|
177cf8cfeb | ||
|
|
f05f7d656b | ||
|
|
0bf4f1b957 | ||
|
|
cd38119888 | ||
|
|
cadef5c0ff | ||
|
|
02e1c783f6 | ||
|
|
07e30951f8 | ||
|
|
0a0b4c3826 | ||
|
|
eade995185 | ||
|
|
0eba8d11df | ||
|
|
257490366b | ||
|
|
5ef1320a7b | ||
|
|
f2f572fa70 | ||
|
|
e655f0cd7b | ||
|
|
68b46eea7a | ||
|
|
9894e391ef | ||
|
|
5982fd98bf | ||
|
|
d5291eed1c | ||
|
|
34260f1736 | ||
|
|
b9b3d2d230 | ||
|
|
4cf8f5f46c | ||
|
|
eba744a25e | ||
|
|
80e0c41b89 | ||
|
|
cdc787db1b | ||
|
|
ef4dc7a45b | ||
|
|
cb3e949772 | ||
|
|
f02de298c1 | ||
|
|
eb0dc13c88 | ||
|
|
d08bd23c1e | ||
|
|
724f1fea2c | ||
|
|
dcc63e6dfc | ||
|
|
576034e94a | ||
|
|
3ec49ba7bd | ||
|
|
60c687238d | ||
|
|
57b992ffa1 | ||
|
|
1f07a41d5a | ||
|
|
512b47c004 | ||
|
|
818ffbc4b0 | ||
|
|
5e65df7375 | ||
|
|
4eb80d14a0 | ||
|
|
7247a61e0b | ||
|
|
c856f28e11 | ||
|
|
ca30cfd341 | ||
|
|
58ecf1f363 | ||
|
|
d36ff82999 | ||
|
|
d4398aea89 | ||
|
|
672548ce30 | ||
|
|
344965bd29 | ||
|
|
d6a96f07c1 | ||
|
|
6a99d95d4f | ||
|
|
3f1bd3bb66 | ||
|
|
0fbc4edd29 | ||
|
|
b8a9f0d1d3 | ||
|
|
d280e5b1fa | ||
|
|
e04acab0ed | ||
|
|
d868ce5ec7 | ||
|
|
dec58c349e | ||
|
|
d82f5e1f49 | ||
|
|
156450f359 | ||
|
|
c0392efa39 | ||
|
|
3c5644ccfd | ||
|
|
3fb356ebd2 | ||
|
|
fe68ec513d | ||
|
|
a86fb8b091 | ||
|
|
f32bff9688 | ||
|
|
7d355b0fec | ||
|
|
ab4445c261 | ||
|
|
e14363373b | ||
|
|
d9ca409978 | ||
|
|
13596f18da | ||
|
|
80b66da1d8 | ||
|
|
3eb9af9c97 | ||
|
|
f093d0bfd4 | ||
|
|
6a2f4fd376 | ||
|
|
e2f92e4079 | ||
|
|
c944f23d7e | ||
|
|
5872f8a21b | ||
|
|
a090a1ffe8 | ||
|
|
5e24f74fde | ||
|
|
340da73bb7 | ||
|
|
f642019bcc | ||
|
|
7cc542352e | ||
|
|
cf99ea019e | ||
|
|
15c22ec742 | ||
|
|
45ac847dc9 | ||
|
|
4a223c70f2 | ||
|
|
26d636f234 | ||
|
|
aade05b01d | ||
|
|
c3821f0821 | ||
|
|
ac0ac48f6f | ||
|
|
54519b4465 | ||
|
|
9f2e406525 | ||
|
|
edaad2a927 | ||
|
|
262a827ab4 | ||
|
|
4b33d80595 | ||
|
|
4c401162c0 | ||
|
|
168acec5ea | ||
|
|
aab339d3e3 | ||
|
|
1f459af568 | ||
|
|
46f09a0adc | ||
|
|
f65003a14e | ||
|
|
e092b4024a | ||
|
|
9d7bab18a4 | ||
|
|
8688d47e3d | ||
|
|
04bb72c0dc | ||
|
|
1c065082d2 | ||
|
|
38642e6905 | ||
|
|
ebdf888a2f | ||
|
|
9745e4678a | ||
|
|
33a17df9fc | ||
|
|
4ff7aeff39 | ||
|
|
edb75870b5 | ||
|
|
a3c746846d | ||
|
|
4044accf03 | ||
|
|
943e7e7198 | ||
|
|
4f00cb6346 | ||
|
|
9d55086720 | ||
|
|
eaa2ef6ba4 | ||
|
|
37c3752b31 | ||
|
|
8585efadbe | ||
|
|
13648dd6f4 | ||
|
|
427dff3450 | ||
|
|
08bc0a947a | ||
|
|
c3d583fe9c | ||
|
|
983a72dab9 | ||
|
|
811152c08a | ||
|
|
6a1b9cf10a | ||
|
|
599b141b8a | ||
|
|
b9e47e356b | ||
|
|
5e2a477bbf | ||
|
|
bba34cb975 | ||
|
|
a674011c0d | ||
|
|
c78b5cd2ba | ||
|
|
f3e374ac77 | ||
|
|
1e6a9dbd56 | ||
|
|
564a2601f6 |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -46,6 +46,7 @@ libutil/util_prg_example
|
|||||||
libutil/util_rec_example
|
libutil/util_rec_example
|
||||||
libutil/util_scandir_example
|
libutil/util_scandir_example
|
||||||
libzds/libzds.a
|
libzds/libzds.a
|
||||||
|
libvmcp/vmcp_example
|
||||||
mon_tools/mon_fsstatd
|
mon_tools/mon_fsstatd
|
||||||
mon_tools/mon_procd
|
mon_tools/mon_procd
|
||||||
osasnmpd/osasnmpd
|
osasnmpd/osasnmpd
|
||||||
@@ -67,6 +68,7 @@ zconf/qeth/lsqeth
|
|||||||
zconf/scm/lsscm
|
zconf/scm/lsscm
|
||||||
zconf/zcrypt/chzcrypt
|
zconf/zcrypt/chzcrypt
|
||||||
zconf/zcrypt/lszcrypt
|
zconf/zcrypt/lszcrypt
|
||||||
|
zconf/zcrypt/zcryptctl
|
||||||
zdev/src/chzdev
|
zdev/src/chzdev
|
||||||
zdev/src/chzdev_usage.c
|
zdev/src/chzdev_usage.c
|
||||||
zdev/src/lszdev
|
zdev/src/lszdev
|
||||||
@@ -75,7 +77,8 @@ zdsfs/zdsfs
|
|||||||
zdump/zgetdump
|
zdump/zgetdump
|
||||||
zfcpdump/cpioinit
|
zfcpdump/cpioinit
|
||||||
zfcpdump/zfcpdump_part
|
zfcpdump/zfcpdump_part
|
||||||
zfcpdump/zfcpdump_part.rd
|
zfcpdump/zfcpdump-initrd
|
||||||
|
zfcpdump/10-zfcpdump.install
|
||||||
ziomon/ziomon_mgr
|
ziomon/ziomon_mgr
|
||||||
ziomon/ziomon_util
|
ziomon/ziomon_util
|
||||||
ziomon/ziomon_zfcpdd
|
ziomon/ziomon_zfcpdd
|
||||||
@@ -86,4 +89,10 @@ zipl/boot/*.exec
|
|||||||
zipl/boot/data.h
|
zipl/boot/data.h
|
||||||
zipl/src/chreipl_helper.device-mapper
|
zipl/src/chreipl_helper.device-mapper
|
||||||
zipl/src/zipl
|
zipl/src/zipl
|
||||||
|
zipl/src/zipl_helper.device-mapper
|
||||||
zkey/zkey
|
zkey/zkey
|
||||||
|
zkey/zkey-cryptsetup
|
||||||
|
zkey/check-dep-zkey
|
||||||
|
zkey/check-dep-zkey-cryptsetup
|
||||||
|
zkey/detect-libcryptsetup.dep
|
||||||
|
zpcictl/zpcictl
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ List of all individuals having contributed content to s390-tools
|
|||||||
- Christof Schmitt
|
- Christof Schmitt
|
||||||
- Claudio Imbrenda
|
- Claudio Imbrenda
|
||||||
- Clemens von Mann
|
- Clemens von Mann
|
||||||
- cvs2git
|
|
||||||
- Dan Horak
|
- Dan Horak
|
||||||
- Despina Papadopoulou
|
- Despina Papadopoulou
|
||||||
|
- Dimitri John Ledkov
|
||||||
- Eberhard Pasch
|
- Eberhard Pasch
|
||||||
- Einar Lueck
|
- Einar Lueck
|
||||||
|
- Eric Sandeen
|
||||||
- Erwin Vicari
|
- Erwin Vicari
|
||||||
- Eugene Crosser
|
- Eugene Crosser
|
||||||
- Eugene Dvurechenski
|
- Eugene Dvurechenski
|
||||||
- Eugene (jno) Dvurechenski
|
|
||||||
- Farhan Ali
|
- Farhan Ali
|
||||||
- Fedor Loshakov
|
- Fedor Loshakov
|
||||||
- Felix Beck
|
- Felix Beck
|
||||||
@@ -47,6 +47,7 @@ List of all individuals having contributed content to s390-tools
|
|||||||
- Jan Glauber
|
- Jan Glauber
|
||||||
- Jan Hoeppner
|
- Jan Hoeppner
|
||||||
- Jan Willeke
|
- Jan Willeke
|
||||||
|
- Javier Martinez Canillas
|
||||||
- Jean-Baptiste Joret
|
- Jean-Baptiste Joret
|
||||||
- Jens Remus
|
- Jens Remus
|
||||||
- Jochen Roehrig
|
- Jochen Roehrig
|
||||||
@@ -62,7 +63,6 @@ List of all individuals having contributed content to s390-tools
|
|||||||
- Martin Schwidefsky
|
- Martin Schwidefsky
|
||||||
- Maxim Shchetynin
|
- Maxim Shchetynin
|
||||||
- Melissa Howland
|
- Melissa Howland
|
||||||
- Michael
|
|
||||||
- Michael Ernst
|
- Michael Ernst
|
||||||
- Michael Holzheu
|
- Michael Holzheu
|
||||||
- Michael Mueller
|
- Michael Mueller
|
||||||
@@ -77,11 +77,9 @@ List of all individuals having contributed content to s390-tools
|
|||||||
- Ralph Wuerthner
|
- Ralph Wuerthner
|
||||||
- Rene Trumpp
|
- Rene Trumpp
|
||||||
- Rolf Schaefer
|
- Rolf Schaefer
|
||||||
- root
|
|
||||||
- Sa Liu
|
- Sa Liu
|
||||||
- Sascha Silbe
|
- Sascha Silbe
|
||||||
- Sebastian Ott
|
- Sebastian Ott
|
||||||
- Seshagiri N Ippili
|
|
||||||
- Seshagiri N. Ippili
|
- Seshagiri N. Ippili
|
||||||
- Simon Sturm
|
- Simon Sturm
|
||||||
- Stefan Bader
|
- Stefan Bader
|
||||||
@@ -101,6 +99,7 @@ List of all individuals having contributed content to s390-tools
|
|||||||
- Thomas Weber
|
- Thomas Weber
|
||||||
- Ursula Braun
|
- Ursula Braun
|
||||||
- Utz Bacher
|
- Utz Bacher
|
||||||
|
- Vasily Gorbik
|
||||||
- Viktor Mihajlovski
|
- Viktor Mihajlovski
|
||||||
- Volker Sameske
|
- Volker Sameske
|
||||||
- Wolfgang Taphorn
|
- Wolfgang Taphorn
|
||||||
|
|||||||
111
CHANGELOG.md
111
CHANGELOG.md
@@ -1,5 +1,116 @@
|
|||||||
Release history for s390-tools (MIT version)
|
Release history for s390-tools (MIT version)
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
* __v2.8.0 (2019-02-15)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.20
|
||||||
|
|
||||||
|
Changes of existing tools:
|
||||||
|
- Switch to using /run directory instead of the legacy /var/run
|
||||||
|
- zkey: Add --pbkdf pbkdf2 to generated cryptsetup luksFormat command
|
||||||
|
- zdsfs: Add online VTOC refresh
|
||||||
|
- pkey: Support autoloading kernel pkey module
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- zkey: Avoid EPERM on key change if user is not owner of key file
|
||||||
|
- cpumf/cpumf_helper: Always return list reference for --sfb-size
|
||||||
|
|
||||||
|
* __v2.7.1 (2018-12-13)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.19
|
||||||
|
|
||||||
|
Changes of existing tools:
|
||||||
|
- zkey: Enhance file read/write error handling
|
||||||
|
- cmsfs-fuse: Write more than a single line in linefeed mode
|
||||||
|
- zpcictl: Add warning for unsupported operations
|
||||||
|
- zipl: Use the BLS "title" field as the IPL section name
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- cmsfs-fuse: Fix iconv buffer aliasing
|
||||||
|
- cmsfs-fuse: Fix memory leak in cmsfs_rename()
|
||||||
|
- fdasd: Fix possible integer overflow
|
||||||
|
- fdasd: Fix resource leak in fdasd_parse_conffile()
|
||||||
|
- zdev: Fix memory leak in misc_readlink()
|
||||||
|
- dasdinfo: Display error messages on stderr
|
||||||
|
- zkey: Include /sbin into PATH when executing commands
|
||||||
|
- Makefile: Fix parallel build
|
||||||
|
- GCC8 warning fixes across the board for:
|
||||||
|
cmsfs-fuse, dasdinfo, dasdview, dump2tar, fdasd, hmcdrvfs, hyptop,
|
||||||
|
ip_watcher, libvmdump, libvtoc, lsqeth, lszcrypt, qethqoat, zdev, zdsfs,
|
||||||
|
zgetdump, zipl, zpcictl
|
||||||
|
|
||||||
|
* __v2.7.0 (2018-10-31)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.19
|
||||||
|
|
||||||
|
Add new tool:
|
||||||
|
- zcryptctl: Add zcryptctl for multiple zcrypt node management
|
||||||
|
- zpcictl: Add zpcictl for reporting defective PCI devices
|
||||||
|
|
||||||
|
Changes of existing tools:
|
||||||
|
- qethqoat: Add OSA-Express7S support
|
||||||
|
- lszcrypt: Add support for alternative zcrypt device drivers
|
||||||
|
- zfcpdump: Add install script for zfcpdump
|
||||||
|
- zipl: Make zipl work with XFS by using the FIEMAP mapping ioctl
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- lstape: Fix output with SCSI lin_tape and multiple paths to same unit
|
||||||
|
- lstape: Fix output without SCSI generic (sg)
|
||||||
|
- lsluns: Fix to prevent error messages if there are non-zfcp SCSI devices
|
||||||
|
- lstape: Fix to prevent error messages if there are non-zfcp SCSI devices
|
||||||
|
- lstape: Fix description of --type and <devbusid> filter for channel tapes
|
||||||
|
- lstape: Fix SCSI output description in man page
|
||||||
|
- lstape: Fix SCSI HBA CCW device bus-ID e.g. for virtio-scsi-ccw
|
||||||
|
- Direct --help and --version output to stdout for several tools
|
||||||
|
- osasnmpd: Start without real OSA devices
|
||||||
|
|
||||||
|
* __v2.6.0 (2018-08-10)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.18
|
||||||
|
|
||||||
|
Add new tool:
|
||||||
|
- zkey: Add zkey-cryptsetup tool
|
||||||
|
Changes of existing tools:
|
||||||
|
- netboot: add BOOTIF support
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- mon_procd: fix parsing of /proc/<pid>/stat
|
||||||
|
- netboot: Include compressed kernel modules in initramfs
|
||||||
|
- netboot: Send client architecture and handle path prefix
|
||||||
|
|
||||||
|
* __v2.5.0 (2018-06-08)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.17
|
||||||
|
|
||||||
|
Changes of existing tools:
|
||||||
|
- zdev: Add support for reading firmware configuration files
|
||||||
|
- zipl: Add BootLoaderSpec support
|
||||||
|
- scripts: Add script to switch zipl config to a BootLoaderSpec setup
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- lsluns: Print a message if no adapter or port exists
|
||||||
|
|
||||||
|
* __v2.4.0 (2018-05-07)__
|
||||||
|
|
||||||
|
For Linux kernel version: 4.16
|
||||||
|
|
||||||
|
Changes of existing tools:
|
||||||
|
- dbginfo: Gather nvme related data
|
||||||
|
- zipl: Rewrite helper script in C
|
||||||
|
- libutil: Add function util_strstrip
|
||||||
|
- libvmcp: Introduce libvmcp
|
||||||
|
- zipl: Extend DASD stand-alone dumpers to drop zero pages
|
||||||
|
- zgetdump: Add verbose option
|
||||||
|
- zgetdump: Add 'Dump file size' field for zgetdump -i output
|
||||||
|
- cpumf: Add IBM z14 ZR1 to the CPU Measurement Facility model list
|
||||||
|
- zkey: Add build dependency to OpenSSL (libcrypto)
|
||||||
|
- zkey: Add keystore implementation
|
||||||
|
|
||||||
|
|
||||||
|
Bug Fixes:
|
||||||
|
- hmcdrvfs: fix parsing of link count >= 1000
|
||||||
|
- zgetdump: Avoid Segfault on processing dumps with memory limit
|
||||||
|
- chreipl: correct fcp reipl sysfs write sequence
|
||||||
|
- udev: Replace WAIT_FOR with TEST keyword
|
||||||
|
|
||||||
* __v2.3.0 (2018-01-30)__
|
* __v2.3.0 (2018-01-30)__
|
||||||
|
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -3,12 +3,12 @@ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/ar
|
|||||||
# Include common definitions
|
# Include common definitions
|
||||||
include common.mak
|
include common.mak
|
||||||
|
|
||||||
LIB_DIRS = libvtoc libu2s libutil libzds libdasd libvmdump libccw
|
LIB_DIRS = libvtoc libu2s libutil libzds libdasd libvmdump libccw libvmcp
|
||||||
TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \
|
TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \
|
||||||
tape390 osasnmpd qetharp ip_watcher qethconf scripts zconf \
|
tape390 osasnmpd qetharp ip_watcher qethconf scripts zconf \
|
||||||
vmconvert vmcp man mon_tools dasdinfo vmur cpuplugd ipl_tools \
|
vmconvert vmcp man mon_tools dasdinfo vmur cpuplugd ipl_tools \
|
||||||
ziomon iucvterm hyptop cmsfs-fuse qethqoat zfcpdump zdsfs cpumf \
|
ziomon iucvterm hyptop cmsfs-fuse qethqoat zfcpdump zdsfs cpumf \
|
||||||
systemd hmcdrvfs cpacfstats zdev dump2tar zkey netboot etc
|
systemd hmcdrvfs cpacfstats zdev dump2tar zkey netboot etc zpcictl
|
||||||
SUB_DIRS = $(LIB_DIRS) $(TOOL_DIRS)
|
SUB_DIRS = $(LIB_DIRS) $(TOOL_DIRS)
|
||||||
|
|
||||||
all: $(TOOL_DIRS)
|
all: $(TOOL_DIRS)
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -264,12 +264,16 @@ build options:
|
|||||||
| pfm | `HAVE_PFM` | cpacfstats |
|
| pfm | `HAVE_PFM` | cpacfstats |
|
||||||
| net-snmp | `HAVE_SNMP` | osasnmpd |
|
| net-snmp | `HAVE_SNMP` | osasnmpd |
|
||||||
| glibc-static | `HAVE_LIBC_STATIC` | zfcpdump |
|
| glibc-static | `HAVE_LIBC_STATIC` | zfcpdump |
|
||||||
|
| openssl | `HAVE_OPENSSL` | zkey |
|
||||||
|
| cryptsetup | `HAVE_CRYPTSETUP2` | zkey-cryptsetup |
|
||||||
|
| json-c | `HAVE_JSONC` | zkey-cryptsetup |
|
||||||
|
|
||||||
This table lists additional build or install options:
|
This table lists additional build or install options:
|
||||||
|
|
||||||
| __COMPONENT__ | __OPTION__ | __TOOLS__ |
|
| __COMPONENT__ | __OPTION__ | __TOOLS__ |
|
||||||
|----------------|:----------------:|:-------------------------------:|
|
|----------------|:----------------:|:-------------------------------:|
|
||||||
| dracut | `HAVE_DRACUT` | zdev |
|
| dracut | `HAVE_DRACUT` | zdev |
|
||||||
|
| initramfs-tools| `HAVE_INITRAMFS` | zdev |
|
||||||
|
|
||||||
The s390-tools build process uses "pkg-config" if available and hard-coded
|
The s390-tools build process uses "pkg-config" if available and hard-coded
|
||||||
compiler and linker options otherwise.
|
compiler and linker options otherwise.
|
||||||
@@ -366,3 +370,15 @@ the different tools are provided:
|
|||||||
For running znetconf these programs are required:
|
For running znetconf these programs are required:
|
||||||
- modprobe (kmod)
|
- modprobe (kmod)
|
||||||
- vmcp (s390-tools)
|
- vmcp (s390-tools)
|
||||||
|
|
||||||
|
* zkey:
|
||||||
|
For building the zkey tools you need openssl version 0.9.7 or newer installed
|
||||||
|
(openssl-devel.rpm). Also required are cryptsetup version 2.0.3 or newer
|
||||||
|
(cryptsetup-devel.rpm), and json-c version 0.12 or newer (json-c-devel.rpm).
|
||||||
|
Tip: you may skip the zkey build by adding `HAVE_OPENSSL=0`, and you may
|
||||||
|
may skip the zkey-cryptsetup build by adding `HAVE_CRYPTSETUP2=0`, or
|
||||||
|
`HAVE_JSONC=0` to the make invocation.
|
||||||
|
A new group 'zkeyadm' needs to be created and all users intending to use the
|
||||||
|
tool must be added to this group. The owner of the default key repository
|
||||||
|
'/etc/zkey/repository' must be set to group 'zkeyadm' with write permission
|
||||||
|
for this group.
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ cmsfs-fuse uses a configuration file for automatic translation based on the file
|
|||||||
Upon startup, cmsfs-fuse evaluates the file .cmsfs-fuse/filetypes.conf in the user's home directory. If the file does not
|
Upon startup, cmsfs-fuse evaluates the file .cmsfs-fuse/filetypes.conf in the user's home directory. If the file does not
|
||||||
exist cmsfs-fuse evaluates the file /etc/cmsfs-fuse/filetypes.conf.
|
exist cmsfs-fuse evaluates the file /etc/cmsfs-fuse/filetypes.conf.
|
||||||
|
|
||||||
The filetypes.conf file contains the CMS file types that are automaticaly translated to ASCII if cmsfs-fuse is started
|
The filetypes.conf file contains the CMS file types that are automatically translated to ASCII if cmsfs-fuse is started
|
||||||
with the -t option. The syntax of the configuration file is one file type per line. Lines that start with a # followed by a space are treated as
|
with the -t option. The syntax of the configuration file is one file type per line. Lines that start with a # followed by a space are treated as
|
||||||
comments and are ignored. The file type is 8 characters long and must consist of valid CMS file name characters only.
|
comments and are ignored. The file type is 8 characters long and must consist of valid CMS file name characters only.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Main function
|
* Main function
|
||||||
*
|
*
|
||||||
* Copyright IBM Corp. 2010, 2017
|
* Copyright IBM Corp. 2010, 2018
|
||||||
*
|
*
|
||||||
* s390-tools is free software; you can redistribute it and/or modify
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <fuse.h>
|
#include <fuse.h>
|
||||||
#include <fuse_opt.h>
|
#include <fuse_opt.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#ifdef HAVE_SETXATTR
|
#ifdef HAVE_SETXATTR
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "lib/util_base.h"
|
#include "lib/util_base.h"
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/util_list.h"
|
#include "lib/util_list.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
@@ -76,7 +78,7 @@ static const struct fuse_opt cmsfs_opts[] = {
|
|||||||
|
|
||||||
static void usage(const char *progname)
|
static void usage(const char *progname)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stdout,
|
||||||
"Usage: %s DEVICE MOUNTPOINT [OPTIONS]\n"
|
"Usage: %s DEVICE MOUNTPOINT [OPTIONS]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Use the cmsfs-fuse command to read and write files stored on a z/VM CMS disk.\n"
|
"Use the cmsfs-fuse command to read and write files stored on a z/VM CMS disk.\n"
|
||||||
@@ -232,6 +234,8 @@ struct file {
|
|||||||
int null_records;
|
int null_records;
|
||||||
/* write cache for text mode */
|
/* write cache for text mode */
|
||||||
char *wcache;
|
char *wcache;
|
||||||
|
/* buffer for iconv */
|
||||||
|
char *iconv_buf;
|
||||||
/* used bytes in write cache */
|
/* used bytes in write cache */
|
||||||
int wcache_used;
|
int wcache_used;
|
||||||
/* committed written bytes to FUSE */
|
/* committed written bytes to FUSE */
|
||||||
@@ -601,7 +605,7 @@ static struct file *file_open(const char *name)
|
|||||||
char uc_name[MAX_FNAME];
|
char uc_name[MAX_FNAME];
|
||||||
struct file *f;
|
struct file *f;
|
||||||
|
|
||||||
strncpy(uc_name, name, MAX_FNAME);
|
util_strlcpy(uc_name, name, MAX_FNAME);
|
||||||
str_toupper(uc_name);
|
str_toupper(uc_name);
|
||||||
|
|
||||||
util_list_iterate(&open_file_list, f)
|
util_list_iterate(&open_file_list, f)
|
||||||
@@ -923,7 +927,6 @@ static void set_record(struct file *f, int *record, off_t addr, int len,
|
|||||||
static void add_record_ext(struct record *rec, struct record_ext *ext)
|
static void add_record_ext(struct record *rec, struct record_ext *ext)
|
||||||
{
|
{
|
||||||
struct record_ext *tmp;
|
struct record_ext *tmp;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
if (rec->ext == NULL) {
|
if (rec->ext == NULL) {
|
||||||
rec->ext = ext;
|
rec->ext = ext;
|
||||||
@@ -931,9 +934,7 @@ static void add_record_ext(struct record *rec, struct record_ext *ext)
|
|||||||
ext->next = NULL;
|
ext->next = NULL;
|
||||||
} else {
|
} else {
|
||||||
tmp = rec->ext;
|
tmp = rec->ext;
|
||||||
i++;
|
|
||||||
while (tmp->next != NULL) {
|
while (tmp->next != NULL) {
|
||||||
i++;
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
tmp->next = ext;
|
tmp->next = ext;
|
||||||
@@ -1567,7 +1568,7 @@ static off_t lookup_file(const char *name, struct fst_entry *fst, int flag)
|
|||||||
off_t faddr = 0;
|
off_t faddr = 0;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
strncpy(uc_name, name, MAX_FNAME);
|
util_strlcpy(uc_name, name, MAX_FNAME);
|
||||||
str_toupper(uc_name);
|
str_toupper(uc_name);
|
||||||
|
|
||||||
if (flag == HIDE_UNLINKED && file_unlinked(uc_name))
|
if (flag == HIDE_UNLINKED && file_unlinked(uc_name))
|
||||||
@@ -1851,7 +1852,26 @@ static int cmsfs_open(const char *path, struct fuse_file_info *fi)
|
|||||||
if (f->wcache == NULL)
|
if (f->wcache == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
strncpy(f->path, path, MAX_FNAME + 1);
|
/*
|
||||||
|
* For fixed-length records f->fst->record_len contains
|
||||||
|
* the fixed record length, which will not change. For
|
||||||
|
* variable-length records it contains the (current) maximum
|
||||||
|
* record length, which could be increased later by appending
|
||||||
|
* new records, so use MAX_RECORD_LEN for the iconv buffer.
|
||||||
|
* The MAX_RECORD_LEN is not valid for fixed-length records,
|
||||||
|
* only for variable-length records, so use the actual record
|
||||||
|
* length (f->fst->record_len) for fixed-length records.
|
||||||
|
*/
|
||||||
|
if (f->fst->record_format == RECORD_LEN_FIXED)
|
||||||
|
f->iconv_buf = malloc(f->fst->record_len + 1);
|
||||||
|
else
|
||||||
|
f->iconv_buf = malloc(MAX_RECORD_LEN + 1);
|
||||||
|
if (f->iconv_buf == NULL) {
|
||||||
|
destroy_file_object(f);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
util_strlcpy(f->path, path, MAX_FNAME + 1);
|
||||||
str_toupper(f->path);
|
str_toupper(f->path);
|
||||||
|
|
||||||
f->use_count = 1;
|
f->use_count = 1;
|
||||||
@@ -2108,7 +2128,7 @@ static int cmsfs_create(const char *path, mode_t mode,
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* force uppercase */
|
/* force uppercase */
|
||||||
strncpy(uc_name, path + 1, MAX_FNAME);
|
util_strlcpy(uc_name, path + 1, MAX_FNAME);
|
||||||
str_toupper(uc_name);
|
str_toupper(uc_name);
|
||||||
|
|
||||||
rc = encode_edf_name(uc_name, fname, ftype);
|
rc = encode_edf_name(uc_name, fname, ftype);
|
||||||
@@ -2550,14 +2570,13 @@ static void get_block_data_from_record(struct record *rec, off_t offset,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int convert_text(iconv_t conv, char *buf, int size)
|
static int convert_text(iconv_t conv, char *in_buf, char *out_buf, int size)
|
||||||
{
|
{
|
||||||
size_t out_count = size;
|
size_t out_count = size;
|
||||||
size_t in_count = size;
|
size_t in_count = size;
|
||||||
char *data_ptr = buf;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = iconv(conv, &data_ptr, &in_count, &data_ptr, &out_count);
|
rc = iconv(conv, &in_buf, &in_count, &out_buf, &out_count);
|
||||||
if ((rc == -1) || (in_count != 0)) {
|
if ((rc == -1) || (in_count != 0)) {
|
||||||
DEBUG("Code page translation EBCDIC-ASCII failed\n");
|
DEBUG("Code page translation EBCDIC-ASCII failed\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
@@ -2618,14 +2637,15 @@ static int cmsfs_read(const char *path, char *buf, size_t size, off_t offset,
|
|||||||
/* read one record */
|
/* read one record */
|
||||||
if (addr == NULL_BLOCK)
|
if (addr == NULL_BLOCK)
|
||||||
memset(buf, 0, chunk);
|
memset(buf, 0, chunk);
|
||||||
else {
|
else if (f->translate) {
|
||||||
rc = _read(buf, chunk, addr);
|
rc = _read(f->iconv_buf, chunk, addr);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
rc = convert_text(cmsfs.iconv_from, f->iconv_buf, buf, chunk);
|
||||||
|
if (rc < 0)
|
||||||
if (f->translate) {
|
return rc;
|
||||||
rc = convert_text(cmsfs.iconv_from, buf, chunk);
|
} else {
|
||||||
|
rc = _read(buf, chunk, addr);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -2757,7 +2777,7 @@ static int delete_file(const char *path)
|
|||||||
fst_last = find_last_fdir_entry(cmsfs.fdir, cmsfs.dir_levels);
|
fst_last = find_last_fdir_entry(cmsfs.fdir, cmsfs.dir_levels);
|
||||||
|
|
||||||
/* remove unlinked file from fcache */
|
/* remove unlinked file from fcache */
|
||||||
strncpy(file, path + 1, MAX_FNAME);
|
util_strlcpy(file, path + 1, MAX_FNAME);
|
||||||
str_toupper(file);
|
str_toupper(file);
|
||||||
invalidate_htab_entry(file);
|
invalidate_htab_entry(file);
|
||||||
|
|
||||||
@@ -2841,20 +2861,21 @@ static int cmsfs_rename(const char *path, const char *new_path)
|
|||||||
str_toupper(uc_new_name);
|
str_toupper(uc_new_name);
|
||||||
|
|
||||||
rc = encode_edf_name(uc_new_name, fname, ftype);
|
rc = encode_edf_name(uc_new_name, fname, ftype);
|
||||||
|
free(uc_new_name);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
memcpy(&fst.name[0], fname, 8);
|
memcpy(&fst.name[0], fname, 8);
|
||||||
memcpy(&fst.type[0], ftype, 8);
|
memcpy(&fst.type[0], ftype, 8);
|
||||||
|
|
||||||
strncpy(uc_old_name, path + 1, MAX_FNAME);
|
util_strlcpy(uc_old_name, path + 1, MAX_FNAME);
|
||||||
str_toupper(uc_old_name);
|
str_toupper(uc_old_name);
|
||||||
invalidate_htab_entry(uc_old_name);
|
invalidate_htab_entry(uc_old_name);
|
||||||
|
|
||||||
/* update name in file object if the file is opened */
|
/* update name in file object if the file is opened */
|
||||||
f = file_open(uc_old_name);
|
f = file_open(uc_old_name);
|
||||||
if (f != NULL) {
|
if (f != NULL) {
|
||||||
strncpy(f->path, new_path, MAX_FNAME + 1);
|
util_strlcpy(f->path, new_path, MAX_FNAME + 1);
|
||||||
str_toupper(f->path);
|
str_toupper(f->path);
|
||||||
memcpy(f->fst->name, fname, 8);
|
memcpy(f->fst->name, fname, 8);
|
||||||
memcpy(f->fst->type, ftype, 8);
|
memcpy(f->fst->type, ftype, 8);
|
||||||
@@ -3743,7 +3764,7 @@ static int extend_block_variable(struct file *f, const char *buf, int len,
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("%s: wrote %d record bytes\n", __func__, rlen);
|
DEBUG("%s: wrote %d record bytes\n", __func__, rlen);
|
||||||
if (size <= 0)
|
if (size == 0)
|
||||||
return copied;
|
return copied;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4167,22 +4188,13 @@ static ssize_t find_newline(const char *buf, int len)
|
|||||||
return pos - buf;
|
return pos - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cmsfs_write(const char *path, const char *buf, size_t size,
|
static int cmsfs_write_strings(struct file *f, const char *buf,
|
||||||
off_t offset, struct fuse_file_info *fi)
|
size_t size, off_t offset)
|
||||||
{
|
{
|
||||||
int scan_len = MIN(size, (size_t)MAX_RECORD_LEN + 1);
|
int scan_len = MIN(size, (size_t)MAX_RECORD_LEN + 1);
|
||||||
int rc, nl_byte = 1, null_record = 0, pad = 0;
|
int rc, nl_byte = 1, null_record = 0, pad = 0;
|
||||||
struct file *f = get_fobj(fi);
|
|
||||||
ssize_t rsize;
|
ssize_t rsize;
|
||||||
|
|
||||||
(void) path;
|
|
||||||
|
|
||||||
if (cmsfs.readonly)
|
|
||||||
return -EROFS;
|
|
||||||
|
|
||||||
if (!f->linefeed)
|
|
||||||
return do_write(f, buf, size, offset);
|
|
||||||
|
|
||||||
/* remove already committed bytes */
|
/* remove already committed bytes */
|
||||||
offset -= f->wcache_commited;
|
offset -= f->wcache_commited;
|
||||||
|
|
||||||
@@ -4222,7 +4234,7 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* translate */
|
/* translate */
|
||||||
rc = convert_text(cmsfs.iconv_to, f->wcache, f->wcache_used);
|
rc = convert_text(cmsfs.iconv_to, f->wcache, f->iconv_buf, f->wcache_used);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
@@ -4232,6 +4244,7 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
|
|||||||
*/
|
*/
|
||||||
if (!f->wcache_used) {
|
if (!f->wcache_used) {
|
||||||
*f->wcache = FILLER_EBCDIC;
|
*f->wcache = FILLER_EBCDIC;
|
||||||
|
*f->iconv_buf = FILLER_EBCDIC;
|
||||||
f->wcache_used = 1;
|
f->wcache_used = 1;
|
||||||
nl_byte = 0;
|
nl_byte = 0;
|
||||||
null_record = 1;
|
null_record = 1;
|
||||||
@@ -4242,7 +4255,7 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
|
|||||||
offset += f->pad_bytes;
|
offset += f->pad_bytes;
|
||||||
BUG(offset < 0);
|
BUG(offset < 0);
|
||||||
|
|
||||||
rc = do_write(f, f->wcache, f->wcache_used, offset);
|
rc = do_write(f, f->iconv_buf, f->wcache_used, offset);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
@@ -4257,6 +4270,36 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int cmsfs_write(const char *path, const char *buf, size_t size,
|
||||||
|
off_t offset, struct fuse_file_info *fi)
|
||||||
|
{
|
||||||
|
struct file *f = get_fobj(fi);
|
||||||
|
int rc, written, nbytes;
|
||||||
|
|
||||||
|
(void) path;
|
||||||
|
|
||||||
|
if (cmsfs.readonly)
|
||||||
|
return -EROFS;
|
||||||
|
|
||||||
|
if (!f->linefeed)
|
||||||
|
return do_write(f, buf, size, offset);
|
||||||
|
|
||||||
|
/* Limit the size to what we can report back as written */
|
||||||
|
nbytes = MIN(size, (size_t) INT_MAX);
|
||||||
|
|
||||||
|
written = 0;
|
||||||
|
while (nbytes) {
|
||||||
|
rc = cmsfs_write_strings(f, buf, nbytes, offset);
|
||||||
|
if (rc < 0)
|
||||||
|
return written ? written : rc;
|
||||||
|
written += rc;
|
||||||
|
offset += rc;
|
||||||
|
buf += rc;
|
||||||
|
nbytes -= rc;
|
||||||
|
}
|
||||||
|
return written;
|
||||||
|
}
|
||||||
|
|
||||||
static int cmsfs_unlink(const char *path)
|
static int cmsfs_unlink(const char *path)
|
||||||
{
|
{
|
||||||
struct fst_entry fst;
|
struct fst_entry fst;
|
||||||
@@ -4284,7 +4327,7 @@ static int flush_wcache(struct file *f)
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* translate */
|
/* translate */
|
||||||
rc = convert_text(cmsfs.iconv_to, f->wcache, f->wcache_used);
|
rc = convert_text(cmsfs.iconv_to, f->wcache, f->iconv_buf, f->wcache_used);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
@@ -4292,7 +4335,7 @@ static int flush_wcache(struct file *f)
|
|||||||
offset -= (f->fst->nr_records - f->null_records);
|
offset -= (f->fst->nr_records - f->null_records);
|
||||||
BUG(offset < 0);
|
BUG(offset < 0);
|
||||||
|
|
||||||
rc = do_write(f, f->wcache, f->wcache_used, offset);
|
rc = do_write(f, f->iconv_buf, f->wcache_used, offset);
|
||||||
purge_wcache(f);
|
purge_wcache(f);
|
||||||
f->null_records = 0;
|
f->null_records = 0;
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
@@ -4415,6 +4458,7 @@ static void destroy_file_object(struct file *f)
|
|||||||
struct record *rec;
|
struct record *rec;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
free(f->iconv_buf);
|
||||||
free(f->wcache);
|
free(f->wcache);
|
||||||
free(f->wstate);
|
free(f->wstate);
|
||||||
|
|
||||||
@@ -4498,14 +4542,23 @@ static int cmsfs_process_args(void *data, const char *arg, int key,
|
|||||||
return 1;
|
return 1;
|
||||||
case KEY_HELP:
|
case KEY_HELP:
|
||||||
usage(outargs->argv[0]);
|
usage(outargs->argv[0]);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Usage output needs to go to stdout to be consistent with
|
||||||
|
* coding guidelines. FUSE versions before 3.0.0 print help
|
||||||
|
* output to stderr. Redirect stderr to stdout here to enforce
|
||||||
|
* consistent behavior.
|
||||||
|
*/
|
||||||
|
fflush(stderr);
|
||||||
|
dup2(STDOUT_FILENO, STDERR_FILENO);
|
||||||
|
|
||||||
fuse_opt_add_arg(outargs, "-ho");
|
fuse_opt_add_arg(outargs, "-ho");
|
||||||
cmsfs_fuse_main(outargs, &cmsfs_oper);
|
cmsfs_fuse_main(outargs, &cmsfs_oper);
|
||||||
exit(0);
|
exit(0);
|
||||||
case KEY_VERSION:
|
case KEY_VERSION:
|
||||||
fprintf(stderr, COMP "FUSE file system for CMS disks "
|
fprintf(stdout, COMP "FUSE file system for CMS disks "
|
||||||
"program version %s\n", RELEASE_STRING);
|
"program version %s\n", RELEASE_STRING);
|
||||||
fprintf(stderr, "Copyright IBM Corp. 2010, 2017\n");
|
fprintf(stdout, "Copyright IBM Corp. 2010, 2017\n");
|
||||||
fuse_opt_add_arg(outargs, "--version");
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
#include "cmsfs-fuse.h"
|
#include "cmsfs-fuse.h"
|
||||||
@@ -65,7 +66,7 @@ static void add_filetype(char *name, struct util_list *list)
|
|||||||
entry = malloc(sizeof(*entry));
|
entry = malloc(sizeof(*entry));
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
DIE_PERROR("malloc failed");
|
DIE_PERROR("malloc failed");
|
||||||
strncpy(entry->name, name, MAX_TYPE_LEN);
|
util_strlcpy(entry->name, name, MAX_TYPE_LEN);
|
||||||
util_list_add_head(list, entry);
|
util_list_add_head(list, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
common.mak
15
common.mak
@@ -5,7 +5,7 @@ COMMON_INCLUDED = true
|
|||||||
# The variable "DISTRELEASE" should be overwritten in rpm spec files with:
|
# The variable "DISTRELEASE" should be overwritten in rpm spec files with:
|
||||||
# "make DISTRELEASE=%{release}" and "make install DISTRELEASE=%{release}"
|
# "make DISTRELEASE=%{release}" and "make install DISTRELEASE=%{release}"
|
||||||
VERSION = 2
|
VERSION = 2
|
||||||
RELEASE = 3
|
RELEASE = 8
|
||||||
PATCHLEVEL = 0
|
PATCHLEVEL = 0
|
||||||
DISTRELEASE = build-$(shell date +%Y%m%d)
|
DISTRELEASE = build-$(shell date +%Y%m%d)
|
||||||
S390_TOOLS_RELEASE = $(VERSION).$(RELEASE).$(PATCHLEVEL)-$(DISTRELEASE)
|
S390_TOOLS_RELEASE = $(VERSION).$(RELEASE).$(PATCHLEVEL)-$(DISTRELEASE)
|
||||||
@@ -182,9 +182,10 @@ GROUP = $(shell id -gn)
|
|||||||
export INSTALLDIR BINDIR LIBDIR MANDIR OWNER GROUP
|
export INSTALLDIR BINDIR LIBDIR MANDIR OWNER GROUP
|
||||||
|
|
||||||
# Special defines for zfcpdump
|
# Special defines for zfcpdump
|
||||||
ZFCPDUMP_PART_IMAGE = zfcpdump_part.image
|
ZFCPDUMP_IMAGE = zfcpdump-image
|
||||||
ZFCPDUMP_PART_RD = zfcpdump_part.rd
|
ZFCPDUMP_INITRD = zfcpdump-initrd
|
||||||
export ZFCPDUMP_DIR ZFCPDUMP_PART_IMAGE ZFCPDUMP_PART_RD
|
ZFCPDUMP_FLAVOR = zfcpdump
|
||||||
|
export ZFCPDUMP_DIR ZFCPDUMP_IMAGE ZFCPDUMP_INITRD ZFCPDUMP_FLAVOR
|
||||||
|
|
||||||
CFLAGS ?= $(DEFAULT_CFLAGS) $(OPT_FLAGS)
|
CFLAGS ?= $(DEFAULT_CFLAGS) $(OPT_FLAGS)
|
||||||
HOSTCFLAGS ?= $(DEFAULT_CFLAGS) $(OPT_FLAGS)
|
HOSTCFLAGS ?= $(DEFAULT_CFLAGS) $(OPT_FLAGS)
|
||||||
@@ -239,7 +240,7 @@ endif
|
|||||||
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
|
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%: %.o
|
%: %.o
|
||||||
$(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
%.a:
|
%.a:
|
||||||
$(AR) rcs $@ $^
|
$(AR) rcs $@ $^
|
||||||
@@ -338,6 +339,10 @@ $(rootdir)/libvmdump/libvmdump.a: $(rootdir)/libvmdump
|
|||||||
$(MAKE) -C $(rootdir)/libvmdump/ libvmdump.a
|
$(MAKE) -C $(rootdir)/libvmdump/ libvmdump.a
|
||||||
.PHONY: $(rootdir)/libvmdump
|
.PHONY: $(rootdir)/libvmdump
|
||||||
|
|
||||||
|
$(rootdir)/libvmcp/libvmcp.a: $(rootdir)/libvmcp
|
||||||
|
$(MAKE) -C $(rootdir)/libvmcp/ libvmcp.a
|
||||||
|
.PHONY: $(rootdir)/libvmcp
|
||||||
|
|
||||||
$(rootdir)/zipl/boot/data.o:
|
$(rootdir)/zipl/boot/data.o:
|
||||||
$(MAKE) -C $(rootdir)/zipl/boot/ data.o
|
$(MAKE) -C $(rootdir)/zipl/boot/ data.o
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ The default command is --print all.
|
|||||||
.
|
.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.nf
|
.nf
|
||||||
/var/run/cpacfstatsd_socket
|
/run/cpacfstatsd_socket
|
||||||
.fi
|
.fi
|
||||||
.
|
.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ struct msg_answer {
|
|||||||
|
|
||||||
#define BACKLOG 10
|
#define BACKLOG 10
|
||||||
|
|
||||||
#define SOCKET_FILE "/var/run/cpacfstatsd_socket"
|
#define SOCKET_FILE "/run/cpacfstatsd_socket"
|
||||||
#define PID_FILE "/var/run/cpacfstatsd.pid"
|
#define PID_FILE "/run/cpacfstatsd.pid"
|
||||||
|
|
||||||
#define CPACFSTATS_GROUP "cpacfstats"
|
#define CPACFSTATS_GROUP "cpacfstats"
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ restart the daemon to ensure correct summing of the per-CPU performance
|
|||||||
counters.
|
counters.
|
||||||
|
|
||||||
The starting daemon first checks for any stale pid file
|
The starting daemon first checks for any stale pid file
|
||||||
/var/run/cpacfstatsd.pid. If this file exists, and the process ID in the
|
/run/cpacfstatsd.pid. If this file exists, and the process ID in the
|
||||||
file belongs to an active process, an error message is printed to the
|
file belongs to an active process, an error message is printed to the
|
||||||
console and the program terminates.
|
console and the program terminates.
|
||||||
|
|
||||||
@@ -81,8 +81,8 @@ daemon startup and initialization failures.
|
|||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.nf
|
.nf
|
||||||
/var/run/cpacfstatsd_socket
|
/run/cpacfstatsd_socket
|
||||||
/var/run/cpacfstatsd.pid
|
/run/cpacfstatsd.pid
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
|||||||
12
cpumf/bin/cpumf_helper.in
Normal file → Executable file
12
cpumf/bin/cpumf_helper.in
Normal file → Executable file
@@ -51,10 +51,11 @@ sub cpumf_get_sfb_size()
|
|||||||
my $val = "0,0";
|
my $val = "0,0";
|
||||||
my $SFBSIZE;
|
my $SFBSIZE;
|
||||||
|
|
||||||
return $val unless open($SFBSIZE, '<', $CPUM_SFB_SIZE);
|
if (open($SFBSIZE, '<', $CPUM_SFB_SIZE)) {
|
||||||
$val = <$SFBSIZE>;
|
$val = <$SFBSIZE>;
|
||||||
chomp($val);
|
chomp($val);
|
||||||
close($SFBSIZE);
|
close($SFBSIZE);
|
||||||
|
}
|
||||||
|
|
||||||
return [split /,/, $val];
|
return [split /,/, $val];
|
||||||
}
|
}
|
||||||
@@ -172,7 +173,7 @@ sub cpumf_parse_ctrdef($;$)
|
|||||||
|
|
||||||
# Parse short description (optional)
|
# Parse short description (optional)
|
||||||
if ($line =~ m/^Short-Description:\s*(\S.*)?$/) {
|
if ($line =~ m/^Short-Description:\s*(\S.*)?$/) {
|
||||||
$h->{ctr}->{shortdesc} = $1 || "";
|
$h->{$ctr}->{shortdesc} = $1 || "";
|
||||||
|
|
||||||
# Parse start of counter description
|
# Parse start of counter description
|
||||||
} elsif ($line =~ m/^Description:\s*(\S.*)?$/) {
|
} elsif ($line =~ m/^Description:\s*(\S.*)?$/) {
|
||||||
@@ -211,6 +212,7 @@ my $system_z_hwtype_map = {
|
|||||||
2964 => 'IBM z13',
|
2964 => 'IBM z13',
|
||||||
2965 => 'IBM z13s',
|
2965 => 'IBM z13s',
|
||||||
3906 => 'IBM z14',
|
3906 => 'IBM z14',
|
||||||
|
3907 => 'IBM z14 ZR1',
|
||||||
};
|
};
|
||||||
|
|
||||||
sub get_hardware_type()
|
sub get_hardware_type()
|
||||||
|
|||||||
@@ -1,48 +1,60 @@
|
|||||||
Counter: 0 Name:CPU_CYCLES
|
Counter: 0 Name:CPU_CYCLES
|
||||||
|
Short-Description:CPU Cycles
|
||||||
Description:
|
Description:
|
||||||
Cycle Count
|
Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 1 Name:INSTRUCTIONS
|
Counter: 1 Name:INSTRUCTIONS
|
||||||
|
Short-Description:Instructions
|
||||||
Description:
|
Description:
|
||||||
Instruction Count
|
Instruction Count
|
||||||
.
|
.
|
||||||
Counter: 2 Name:L1I_DIR_WRITES
|
Counter: 2 Name:L1I_DIR_WRITES
|
||||||
|
Short-Description:L1I Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Level-1 I-Cache Directory Write Count
|
Level-1 I-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 3 Name:L1I_PENALTY_CYCLES
|
Counter: 3 Name:L1I_PENALTY_CYCLES
|
||||||
|
Short-Description:L1I Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Level-1 I-Cache Penalty Cycle Count
|
Level-1 I-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 4 Name:L1D_DIR_WRITES
|
Counter: 4 Name:L1D_DIR_WRITES
|
||||||
|
Short-Description:L1D Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Level-1 D-Cache Directory Write Count
|
Level-1 D-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 5 Name:L1D_PENALTY_CYCLES
|
Counter: 5 Name:L1D_PENALTY_CYCLES
|
||||||
|
Short-Description:L1D Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Level-1 D-Cache Penalty Cycle Count
|
Level-1 D-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 32 Name:PROBLEM_STATE_CPU_CYCLES
|
Counter: 32 Name:PROBLEM_STATE_CPU_CYCLES
|
||||||
|
Short-Description:Problem-State CPU Cycles
|
||||||
Description:
|
Description:
|
||||||
Problem-State Cycle Count
|
Problem-State Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 33 Name:PROBLEM_STATE_INSTRUCTIONS
|
Counter: 33 Name:PROBLEM_STATE_INSTRUCTIONS
|
||||||
|
Short-Description:Problem-State Instructions
|
||||||
Description:
|
Description:
|
||||||
Problem-State Instruction Count
|
Problem-State Instruction Count
|
||||||
.
|
.
|
||||||
Counter: 34 Name:PROBLEM_STATE_L1I_DIR_WRITES
|
Counter: 34 Name:PROBLEM_STATE_L1I_DIR_WRITES
|
||||||
|
Short-Description:Problem-State L1I Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Problem-State Level-1 I-Cache Directory Write Count
|
Problem-State Level-1 I-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 35 Name:PROBLEM_STATE_L1I_PENALTY_CYCLES
|
Counter: 35 Name:PROBLEM_STATE_L1I_PENALTY_CYCLES
|
||||||
|
Short-Description:Problem-State L1I Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Problem-State Level-1 I-Cache Penalty Cycle Count
|
Problem-State Level-1 I-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 36 Name:PROBLEM_STATE_L1D_DIR_WRITES
|
Counter: 36 Name:PROBLEM_STATE_L1D_DIR_WRITES
|
||||||
|
Short-Description:Problem-State L1D Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Problem-State Level-1 D-Cache Directory Write Count
|
Problem-State Level-1 D-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 37 Name:PROBLEM_STATE_L1D_PENALTY_CYCLES
|
Counter: 37 Name:PROBLEM_STATE_L1D_PENALTY_CYCLES
|
||||||
|
Short-Description:Problem-State L1D Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Problem-State Level-1 D-Cache Penalty Cycle Count
|
Problem-State Level-1 D-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,32 +1,40 @@
|
|||||||
Counter: 0 Name:CPU_CYCLES
|
Counter: 0 Name:CPU_CYCLES
|
||||||
|
Short-Description:CPU Cycles
|
||||||
Description:
|
Description:
|
||||||
Cycle Count
|
Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 1 Name:INSTRUCTIONS
|
Counter: 1 Name:INSTRUCTIONS
|
||||||
|
Short-Description:Instructions
|
||||||
Description:
|
Description:
|
||||||
Instruction Count
|
Instruction Count
|
||||||
.
|
.
|
||||||
Counter: 2 Name:L1I_DIR_WRITES
|
Counter: 2 Name:L1I_DIR_WRITES
|
||||||
|
Short-Description:L1I Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Level-1 I-Cache Directory Write Count
|
Level-1 I-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 3 Name:L1I_PENALTY_CYCLES
|
Counter: 3 Name:L1I_PENALTY_CYCLES
|
||||||
|
Short-Description:L1I Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Level-1 I-Cache Penalty Cycle Count
|
Level-1 I-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 4 Name:L1D_DIR_WRITES
|
Counter: 4 Name:L1D_DIR_WRITES
|
||||||
|
Short-Description:L1D Directory Writes
|
||||||
Description:
|
Description:
|
||||||
Level-1 D-Cache Directory Write Count
|
Level-1 D-Cache Directory Write Count
|
||||||
.
|
.
|
||||||
Counter: 5 Name:L1D_PENALTY_CYCLES
|
Counter: 5 Name:L1D_PENALTY_CYCLES
|
||||||
|
Short-Description:L1D Penalty Cycles
|
||||||
Description:
|
Description:
|
||||||
Level-1 D-Cache Penalty Cycle Count
|
Level-1 D-Cache Penalty Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 32 Name:PROBLEM_STATE_CPU_CYCLES
|
Counter: 32 Name:PROBLEM_STATE_CPU_CYCLES
|
||||||
|
Short-Description:Problem-State CPU Cycles
|
||||||
Description:
|
Description:
|
||||||
Problem-State Cycle Count
|
Problem-State Cycle Count
|
||||||
.
|
.
|
||||||
Counter: 33 Name:PROBLEM_STATE_INSTRUCTIONS
|
Counter: 33 Name:PROBLEM_STATE_INSTRUCTIONS
|
||||||
|
Short-Description:Problem-State Instructions
|
||||||
Description:
|
Description:
|
||||||
Problem-State Instruction Count
|
Problem-State Instruction Count
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,82 +1,98 @@
|
|||||||
Counter: 64 Name:PRNG_FUNCTIONS
|
Counter: 64 Name:PRNG_FUNCTIONS
|
||||||
|
Short-Description:PRNG Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of the PRNG functions issued by the CPU
|
Total number of the PRNG functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 65 Name:PRNG_CYCLES
|
Counter: 65 Name:PRNG_CYCLES
|
||||||
|
Short-Description:PRNG Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
||||||
performing PRNG functions issued by the CPU
|
performing PRNG functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 66 Name:PRNG_BLOCKED_FUNCTIONS
|
Counter: 66 Name:PRNG_BLOCKED_FUNCTIONS
|
||||||
|
Short-Description:PRNG Blocked Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of the PRNG functions that are issued by the CPU and are
|
Total number of the PRNG functions that are issued by the CPU and are
|
||||||
blocked because the DEA/AES coprocessor is busy performing a function
|
blocked because the DEA/AES coprocessor is busy performing a function
|
||||||
issued by another CPU
|
issued by another CPU
|
||||||
.
|
.
|
||||||
Counter: 67 Name:PRNG_BLOCKED_CYCLES
|
Counter: 67 Name:PRNG_BLOCKED_CYCLES
|
||||||
|
Short-Description:PRNG Blocked Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles blocked for the PRNG functions issued by
|
Total number of CPU cycles blocked for the PRNG functions issued by
|
||||||
the CPU because the DEA/AES coprocessor is busy performing a function
|
the CPU because the DEA/AES coprocessor is busy performing a function
|
||||||
issued by another CPU
|
issued by another CPU
|
||||||
.
|
.
|
||||||
Counter: 68 Name:SHA_FUNCTIONS
|
Counter: 68 Name:SHA_FUNCTIONS
|
||||||
|
Short-Description:SHA Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of SHA functions issued by the CPU
|
Total number of SHA functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 69 Name:SHA_CYCLES
|
Counter: 69 Name:SHA_CYCLES
|
||||||
|
Short-Description:SHA Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles when the SHA coprocessor is busy performing
|
Total number of CPU cycles when the SHA coprocessor is busy performing
|
||||||
the SHA functions issued by the CPU
|
the SHA functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 70 Name:SHA_BLOCKED_FUNCTIONS
|
Counter: 70 Name:SHA_BLOCKED_FUNCTIONS
|
||||||
|
Short-Description:SHA Blocked Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of the SHA functions that are issued by the CPU and are
|
Total number of the SHA functions that are issued by the CPU and are
|
||||||
blocked because the SHA coprocessor is busy performing a function issued
|
blocked because the SHA coprocessor is busy performing a function issued
|
||||||
by another CPU
|
by another CPU
|
||||||
.
|
.
|
||||||
Counter: 71 Name:SHA_BLOCKED_CYCLES
|
Counter: 71 Name:SHA_BLOCKED_CYCLES
|
||||||
|
Short-Description:SHA Bloced Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles blocked for the SHA functions issued by the
|
Total number of CPU cycles blocked for the SHA functions issued by the
|
||||||
CPU because the SHA coprocessor is busy performing a function issued
|
CPU because the SHA coprocessor is busy performing a function issued
|
||||||
by another CPU
|
by another CPU
|
||||||
.
|
.
|
||||||
Counter: 72 Name:DEA_FUNCTIONS
|
Counter: 72 Name:DEA_FUNCTIONS
|
||||||
|
Short-Description:DEA Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of the DEA functions issued by the CPU
|
Total number of the DEA functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 73 Name:DEA_CYCLES
|
Counter: 73 Name:DEA_CYCLES
|
||||||
|
Short-Description:DEA Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
||||||
performing the DEA functions issued by the CPU
|
performing the DEA functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 74 Name:DEA_BLOCKED_FUNCTIONS
|
Counter: 74 Name:DEA_BLOCKED_FUNCTIONS
|
||||||
|
Short-Description:DEA Blocked Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of the DEA functions that are issued by the CPU and are
|
Total number of the DEA functions that are issued by the CPU and are
|
||||||
blocked because the DEA/AES coprocessor is busy performing a function
|
blocked because the DEA/AES coprocessor is busy performing a function
|
||||||
issued by another CPU
|
issued by another CPU
|
||||||
.
|
.
|
||||||
Counter: 75 Name:DEA_BLOCKED_CYCLES
|
Counter: 75 Name:DEA_BLOCKED_CYCLES
|
||||||
|
Short-Description:DEA Blocked Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles blocked for the DEA functions issued by the
|
Total number of CPU cycles blocked for the DEA functions issued by the
|
||||||
CPU because the DEA/AES coprocessor is busy performing a function issued
|
CPU because the DEA/AES coprocessor is busy performing a function issued
|
||||||
by another CPU
|
by another CPU
|
||||||
.
|
.
|
||||||
Counter: 76 Name:AES_FUNCTIONS
|
Counter: 76 Name:AES_FUNCTIONS
|
||||||
|
Short-Description:AES Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of AES functions issued by the CPU
|
Total number of AES functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 77 Name:AES_CYCLES
|
Counter: 77 Name:AES_CYCLES
|
||||||
|
Short-Description:AES Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
Total number of CPU cycles when the DEA/AES coprocessor is busy
|
||||||
performing the AES functions issued by the CPU
|
performing the AES functions issued by the CPU
|
||||||
.
|
.
|
||||||
Counter: 78 Name:AES_BLOCKED_FUNCTIONS
|
Counter: 78 Name:AES_BLOCKED_FUNCTIONS
|
||||||
|
Short-Description:AES Blocked Functions
|
||||||
Description:
|
Description:
|
||||||
Total number of AES functions that are issued by the CPU and are blocked
|
Total number of AES functions that are issued by the CPU and are blocked
|
||||||
because the DEA/AES coprocessor is busy performing a function issued
|
because the DEA/AES coprocessor is busy performing a function issued
|
||||||
by another CPU
|
by another CPU
|
||||||
.
|
.
|
||||||
Counter: 79 Name:AES_BLOCKED_CYCLES
|
Counter: 79 Name:AES_BLOCKED_CYCLES
|
||||||
|
Short-Description:AES Blocked Cycles
|
||||||
Description:
|
Description:
|
||||||
Total number of CPU cycles blocked for the AES functions issued by the
|
Total number of CPU cycles blocked for the AES functions issued by the
|
||||||
CPU because the DEA/AES coprocessor is busy performing a function issued
|
CPU because the DEA/AES coprocessor is busy performing a function issued
|
||||||
|
|||||||
@@ -1,96 +1,114 @@
|
|||||||
Counter: 128 Name:L1I_L2_SOURCED_WRITES
|
Counter: 128 Name:L1I_L2_SOURCED_WRITES
|
||||||
|
Short-Description:L1I L2 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from the Level-2 (L1.5) cache
|
cache line was sourced from the Level-2 (L1.5) cache
|
||||||
.
|
.
|
||||||
Counter: 129 Name:L1D_L2_SOURCED_WRITES
|
Counter: 129 Name:L1D_L2_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the installed
|
A directory write to the Level-1 D-Cache directory where the installed
|
||||||
cache line was sourced from the Level-2 (L1.5) cache
|
cache line was sourced from the Level-2 (L1.5) cache
|
||||||
.
|
.
|
||||||
Counter: 130 Name:L1I_L3_LOCAL_WRITES
|
Counter: 130 Name:L1I_L3_LOCAL_WRITES
|
||||||
|
Short-Description:L1I L3 Local Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the installed
|
A directory write to the Level-1 I-Cache directory where the installed
|
||||||
cache line was sourced from the Level-3 cache that is on the same book
|
cache line was sourced from the Level-3 cache that is on the same book
|
||||||
as the Instruction cache (Local L2 cache)
|
as the Instruction cache (Local L2 cache)
|
||||||
.
|
.
|
||||||
Counter: 131 Name:L1D_L3_LOCAL_WRITES
|
Counter: 131 Name:L1D_L3_LOCAL_WRITES
|
||||||
|
Short-Description:L1D L3 Local Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the installtion
|
A directory write to the Level-1 D-Cache directory where the installtion
|
||||||
cache line was source from the Level-3 cache that is on the same book
|
cache line was source from the Level-3 cache that is on the same book
|
||||||
as the Data cache (Local L2 cache)
|
as the Data cache (Local L2 cache)
|
||||||
.
|
.
|
||||||
Counter: 132 Name:L1I_L3_REMOTE_WRITES
|
Counter: 132 Name:L1I_L3_REMOTE_WRITES
|
||||||
|
Short-Description:L1I L3 Remote Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the installed
|
A directory write to the Level-1 I-Cache directory where the installed
|
||||||
cache line was sourced from a Level-3 cache that is not on the same
|
cache line was sourced from a Level-3 cache that is not on the same
|
||||||
book as the Instruction cache (Remote L2 cache)
|
book as the Instruction cache (Remote L2 cache)
|
||||||
.
|
.
|
||||||
Counter: 133 Name:L1D_L3_REMOTE_WRITES
|
Counter: 133 Name:L1D_L3_REMOTE_WRITES
|
||||||
|
Short-Description:L1D L3 Remote Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the installed
|
A directory write to the Level-1 D-Cache directory where the installed
|
||||||
cache line was sourced from a Level-3 cache that is not on the same
|
cache line was sourced from a Level-3 cache that is not on the same
|
||||||
book as the Data cache (Remote L2 cache)
|
book as the Data cache (Remote L2 cache)
|
||||||
.
|
.
|
||||||
Counter: 134 Name:L1D_LMEM_SOURCED_WRITES
|
Counter: 134 Name:L1D_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the installed
|
A directory write to the Level-1 D-Cache directory where the installed
|
||||||
cache line was sourced from memory that is attached to the same book
|
cache line was sourced from memory that is attached to the same book
|
||||||
as the Data cache (Local Memory)
|
as the Data cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter: 135 Name:L1I_LMEM_SOURCED_WRITES
|
Counter: 135 Name:L1I_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache where the installed cache
|
A directory write to the Level-1 I-Cache where the installed cache
|
||||||
line was sourced from memory that is attached to the s ame book as the
|
line was sourced from memory that is attached to the s ame book as the
|
||||||
Instruction cahe (local Memory)
|
Instruction cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter: 136 Name:L1D_RO_EXCL_WRITES
|
Counter: 136 Name:L1D_RO_EXCL_WRITES
|
||||||
|
Short-Description:L1D Read-only Exclusive Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache where the line was originally
|
A directory write to the Level-1 D-Cache where the line was originally
|
||||||
in a Read-Only state in the cache but has been updated to be in the
|
in a Read-Only state in the cache but has been updated to be in the
|
||||||
Exclusive state that allows stores to the cache line
|
Exclusive state that allows stores to the cache line
|
||||||
.
|
.
|
||||||
Counter: 137 Name:L1I_CACHELINE_INVALIDATES
|
Counter: 137 Name:L1I_CACHELINE_INVALIDATES
|
||||||
|
Short-Description:L1I Cacheline Invalidates
|
||||||
Description:
|
Description:
|
||||||
A cache line in the Level-1 I-Cache has been invalidated by a store on
|
A cache line in the Level-1 I-Cache has been invalidated by a store on
|
||||||
the same CPU as the Level-1 I-Cache
|
the same CPU as the Level-1 I-Cache
|
||||||
.
|
.
|
||||||
Counter: 138 Name:ITLB1_WRITES
|
Counter: 138 Name:ITLB1_WRITES
|
||||||
|
Short-Description:ITLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written into the Level-1 Instruction
|
A translation entry has been written into the Level-1 Instruction
|
||||||
Translation Lookaside Buffer
|
Translation Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter: 139 Name:DTLB1_WRITES
|
Counter: 139 Name:DTLB1_WRITES
|
||||||
|
Short-Description:DTLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer
|
Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter: 140 Name:TLB2_PTE_WRITES
|
Counter: 140 Name:TLB2_PTE_WRITES
|
||||||
|
Short-Description:TLB2 PTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Page Table
|
A translation entry has been written to the Level-2 TLB Page Table
|
||||||
Entry arrays
|
Entry arrays
|
||||||
.
|
.
|
||||||
Counter: 141 Name:TLB2_CRSTE_WRITES
|
Counter: 141 Name:TLB2_CRSTE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays
|
Segment Table Entry arrays
|
||||||
.
|
.
|
||||||
Counter: 142 Name:TLB2_CRSTE_HPAGE_WRITES
|
Counter: 142 Name:TLB2_CRSTE_HPAGE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays for a one-megabyte large page translation
|
Segment Table Entry arrays for a one-megabyte large page translation
|
||||||
.
|
.
|
||||||
Counter: 145 Name:ITLB1_MISSES
|
Counter: 145 Name:ITLB1_MISSES
|
||||||
|
Short-Description:ITLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
||||||
cycle an ITLB1 miss is in progress
|
cycle an ITLB1 miss is in progress
|
||||||
.
|
.
|
||||||
Counter: 146 Name:DTLB1_MISSES
|
Counter: 146 Name:DTLB1_MISSES
|
||||||
|
Short-Description:DTLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
||||||
an DTLB1 miss is in progress
|
an DTLB1 miss is in progress
|
||||||
.
|
.
|
||||||
Counter: 147 Name:L2C_STORES_SENT
|
Counter: 147 Name:L2C_STORES_SENT
|
||||||
|
Short-Description:L2C Stores Sent
|
||||||
Description:
|
Description:
|
||||||
Incremented by one for every store sent to Level-2 (L1.5) cache
|
Incremented by one for every store sent to Level-2 (L1.5) cache
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -16,288 +16,343 @@
|
|||||||
#
|
#
|
||||||
# Extended Counter Set
|
# Extended Counter Set
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
Counter:128 Name:L1D_WRITES_RO_EXCL
|
Counter:128 Name:L1D_RO_EXCL_WRITES
|
||||||
|
Short-Description:L1D Read-only Exclusive Writes
|
||||||
|
Description:
|
||||||
A directory write to the Level-1 Data cache where the line was
|
A directory write to the Level-1 Data cache where the line was
|
||||||
originally in a Read-Only state in the cache but has been updated
|
originally in a Read-Only state in the cache but has been updated
|
||||||
to be in the Exclusive state that allows stores to the cache line.
|
to be in the Exclusive state that allows stores to the cache line.
|
||||||
.
|
.
|
||||||
Counter:129 Name:DTLB1_WRITES
|
Counter:129 Name:DTLB1_WRITES
|
||||||
|
Short-Description:DTLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer
|
Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter:130 Name:DTLB1_MISSES
|
Counter:130 Name:DTLB1_MISSES
|
||||||
|
Short-Description:DTLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
||||||
a DTLB1 miss is in progress.
|
a DTLB1 miss is in progress.
|
||||||
.
|
.
|
||||||
Counter:131 Name:DTLB1_HPAGE_WRITES
|
Counter:131 Name:DTLB1_HPAGE_WRITES
|
||||||
|
Short-Description:DTLB1 One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer for a one-megabyte page
|
Lookaside Buffer for a one-megabyte page
|
||||||
.
|
.
|
||||||
Counter:132 Name:DTLB1_GPAGE_WRITES
|
Counter:132 Name:DTLB1_GPAGE_WRITES
|
||||||
|
Short-Description:DTLB1 Two-Gigabyte Page Writes
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer for a two-gigabyte page.
|
Lookaside Buffer for a two-gigabyte page.
|
||||||
.
|
.
|
||||||
Counter:133 Name:L1D_L2D_SOURCED_WRITES
|
Counter:133 Name:L1D_L2D_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2D Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from the Level-2 Data cache
|
cache line was sourced from the Level-2 Data cache
|
||||||
.
|
.
|
||||||
Counter:134 Name:ITLB1_WRITES
|
Counter:134 Name:ITLB1_WRITES
|
||||||
|
Short-Description:ITLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Instruction
|
A translation entry has been written to the Level-1 Instruction
|
||||||
Translation Lookaside Buffer
|
Translation Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter:135 Name:ITLB1_MISSES
|
Counter:135 Name:ITLB1_MISSES
|
||||||
|
Short-Description:ITLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
||||||
cycle an ITLB1 miss is in progress
|
cycle an ITLB1 miss is in progress
|
||||||
.
|
.
|
||||||
Counter:136 Name:L1I_L2I_SOURCED_WRITES
|
Counter:136 Name:L1I_L2I_SOURCED_WRITES
|
||||||
|
Short-Description:L1I L2I Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from the Level-2 Instruction cache
|
returned cache line was sourced from the Level-2 Instruction cache
|
||||||
.
|
.
|
||||||
Counter:137 Name:TLB2_PTE_WRITES
|
Counter:137 Name:TLB2_PTE_WRITES
|
||||||
|
Short-Description:TLB2 PTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Page Table
|
A translation entry has been written to the Level-2 TLB Page Table
|
||||||
Entry arrays
|
Entry arrays
|
||||||
.
|
.
|
||||||
Counter:138 Name:TLB2_CRSTE_HPAGE_WRITES
|
Counter:138 Name:TLB2_CRSTE_HPAGE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Combined Region
|
A translation entry has been written to the Level-2 TLB Combined Region
|
||||||
Segment Table Entry arrays for a one-megabyte large page translation
|
Segment Table Entry arrays for a one-megabyte large page translation
|
||||||
.
|
.
|
||||||
Counter:139 Name:TLB2_CRSTE_WRITES
|
Counter:139 Name:TLB2_CRSTE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Combined Region
|
A translation entry has been written to the Level-2 TLB Combined Region
|
||||||
Segment Table Entry arrays
|
Segment Table Entry arrays
|
||||||
.
|
.
|
||||||
Counter:140 Name:TX_C_TEND
|
Counter:140 Name:TX_C_TEND
|
||||||
|
Short-Description:Completed TEND instructions in constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a constrained transactional-execution
|
A TEND instruction has completed in a constrained transactional-execution
|
||||||
mode
|
mode
|
||||||
.
|
.
|
||||||
Counter:141 Name:TX_NC_TEND
|
Counter:141 Name:TX_NC_TEND
|
||||||
|
Short-Description:Completed TEND instructions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a non-constrained
|
A TEND instruction has completed in a non-constrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:143 Name:L1C_TLB1_MISSES
|
Counter:143 Name:L1C_TLB1_MISSES
|
||||||
|
Short-Description:L1C TLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Increments by one for any cycle where a Level-1 cache or Level-1 TLB miss
|
Increments by one for any cycle where a Level-1 cache or Level-1 TLB miss
|
||||||
is in progress.
|
is in progress.
|
||||||
.
|
.
|
||||||
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Chip Level-3 cache without intervention
|
cache line was sourced from an On-Chip Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:145 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:145 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Chip Level-3 cache with intervention
|
cache line was sourced from an On-Chip Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:146 Name:L1D_ONNODE_L4_SOURCED_WRITES
|
Counter:146 Name:L1D_ONNODE_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Node L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Node Level-4 cache
|
cache line was sourced from an On-Node Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:147 Name:L1D_ONNODE_L3_SOURCED_WRITES_IV
|
Counter:147 Name:L1D_ONNODE_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Node L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Node Level-3 cache with intervention
|
cache line was sourced from an On-Node Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:148 Name:L1D_ONNODE_L3_SOURCED_WRITES
|
Counter:148 Name:L1D_ONNODE_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Node L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Node Level-3 cache without intervention
|
cache line was sourced from an On-Node Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:149 Name:L1D_ONDRAWER_L4_SOURCED_WRITES
|
Counter:149 Name:L1D_ONDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Drawer Level-4 cache
|
cache line was sourced from an On-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:150 Name:L1D_ONDRAWER_L3_SOURCED_WRITES_IV
|
Counter:150 Name:L1D_ONDRAWER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Drawer L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Drawer Level-3 cache with intervention
|
cache line was sourced from an On-Drawer Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:151 Name:L1D_ONDRAWER_L3_SOURCED_WRITES
|
Counter:151 Name:L1D_ONDRAWER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Drawer L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Drawer Level-3 cache without intervention
|
cache line was sourced from an On-Drawer Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:152 Name:L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES
|
Counter:152 Name:L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Same-Column L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Same-Column Level-4 cache
|
cache line was sourced from an Off-Drawer Same-Column Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:153 Name:L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV
|
Counter:153 Name:L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Drawer Same-Column L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Same-Column Level-3 cache with
|
cache line was sourced from an Off-Drawer Same-Column Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:154 Name:L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES
|
Counter:154 Name:L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Same-Column L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Same-Column Level-3 cache
|
cache line was sourced from an Off-Drawer Same-Column Level-3 cache
|
||||||
without intervention
|
without intervention
|
||||||
.
|
.
|
||||||
Counter:155 Name:L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES
|
Counter:155 Name:L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Far-Column L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Far-Column Level-4 cache
|
cache line was sourced from an Off-Drawer Far-Column Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:156 Name:L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV
|
Counter:156 Name:L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Drawer Far-Column L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Far-Column Level-3 cache with
|
cache line was sourced from an Off-Drawer Far-Column Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:157 Name:L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES
|
Counter:157 Name:L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Far-Column L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Far-Column Level-3 cache
|
cache line was sourced from an Off-Drawer Far-Column Level-3 cache
|
||||||
without intervention
|
without intervention
|
||||||
.
|
.
|
||||||
Counter:158 Name:L1D_ONNODE_MEM_SOURCED_WRITES
|
Counter:158 Name:L1D_ONNODE_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Node Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Node memory
|
cache line was sourced from On-Node memory
|
||||||
.
|
.
|
||||||
Counter:159 Name:L1D_ONDRAWER_MEM_SOURCED_WRITES
|
Counter:159 Name:L1D_ONDRAWER_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Drawer memory
|
cache line was sourced from On-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:160 Name:L1D_OFFDRAWER_MEM_SOURCED_WRITES
|
Counter:160 Name:L1D_OFFDRAWER_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Drawer memory
|
cache line was sourced from On-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:161 Name:L1D_ONCHIP_MEM_SOURCED_WRITES
|
Counter:161 Name:L1D_ONCHIP_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Chip memory
|
cache line was sourced from On-Chip memory
|
||||||
.
|
.
|
||||||
Counter:162 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
Counter:162 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On-Chip Level-3 cache without
|
returned cache line was sourced from an On-Chip Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:163 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:163 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On Chip Level-3 cache with
|
returned cache line was sourced from an On Chip Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:164 Name:L1I_ONNODE_L4_SOURCED_WRITES
|
Counter:164 Name:L1I_ONNODE_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On-Node Level-4 cache
|
returned cache line was sourced from an On-Node Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:165 Name:L1I_ONNODE_L3_SOURCED_WRITES_IV
|
Counter:165 Name:L1I_ONNODE_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Node L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an On-Node Level-3 cache
|
the returned cache line was sourced from an On-Node Level-3 cache
|
||||||
with intervention
|
with intervention
|
||||||
.
|
.
|
||||||
Counter:166 Name:L1I_ONNODE_L3_SOURCED_WRITES
|
Counter:166 Name:L1I_ONNODE_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Node L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an On-Node Level-3 cache
|
the returned cache line was sourced from an On-Node Level-3 cache
|
||||||
without intervention
|
without intervention
|
||||||
.
|
.
|
||||||
Counter:167 Name:L1I_ONDRAWER_L4_SOURCED_WRITES
|
Counter:167 Name:L1I_ONDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an On-Drawer Level-4 cache
|
the returned cache line was sourced from an On-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:168 Name:L1I_ONDRAWER_L3_SOURCED_WRITES_IV
|
Counter:168 Name:L1I_ONDRAWER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Drawer L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an On-Drawer Level-3 cache
|
the returned cache line was sourced from an On-Drawer Level-3 cache
|
||||||
with intervention
|
with intervention
|
||||||
.
|
.
|
||||||
Counter:169 Name:L1I_ONDRAWER_L3_SOURCED_WRITES
|
Counter:169 Name:L1I_ONDRAWER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Drawer L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an On-Drawer Level-3 cache
|
the returned cache line was sourced from an On-Drawer Level-3 cache
|
||||||
without intervention
|
without intervention
|
||||||
.
|
.
|
||||||
Counter:170 Name:L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES
|
Counter:170 Name:L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Same-Column L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Same-Column
|
the returned cache line was sourced from an Off-Drawer Same-Column
|
||||||
Level-4 cache
|
Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:171 Name:L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV
|
Counter:171 Name:L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Drawer Same-Column L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Same-Column
|
the returned cache line was sourced from an Off-Drawer Same-Column
|
||||||
Level-3 cache with intervention
|
Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:172 Name:L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES
|
Counter:172 Name:L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Same-Column L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Same-Column
|
the returned cache line was sourced from an Off-Drawer Same-Column
|
||||||
Level-3 cache without intervention
|
Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:173 Name:L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES
|
Counter:173 Name:L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Far-Column L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Far-Column
|
the returned cache line was sourced from an Off-Drawer Far-Column
|
||||||
Level-4 cache
|
Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:174 Name:L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV
|
Counter:174 Name:L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Drawer Far-Column L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Far-Column
|
the returned cache line was sourced from an Off-Drawer Far-Column
|
||||||
Level-3 cache with intervention
|
Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:175 Name:L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES
|
Counter:175 Name:L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Far-Column L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from an Off-Drawer Far-Column
|
the returned cache line was sourced from an Off-Drawer Far-Column
|
||||||
Level-3 cache without intervention
|
Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:176 Name:L1I_ONNODE_MEM_SOURCED_WRITES
|
Counter:176 Name:L1I_ONNODE_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Node Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from On-Node memory
|
the returned cache line was sourced from On-Node memory
|
||||||
.
|
.
|
||||||
Counter:177 Name:L1I_ONDRAWER_MEM_SOURCED_WRITES
|
Counter:177 Name:L1I_ONDRAWER_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from On-Drawer memory
|
the returned cache line was sourced from On-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:178 Name:L1I_OFFDRAWER_MEM_SOURCED_WRITES
|
Counter:178 Name:L1I_OFFDRAWER_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from On-Drawer memory
|
the returned cache line was sourced from On-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:179 Name:L1I_ONCHIP_MEM_SOURCED_WRITES
|
Counter:179 Name:L1I_ONCHIP_MEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where
|
A directory write to the Level-1 Instruction cache directory where
|
||||||
the returned cache line was sourced from On-Chip memory
|
the returned cache line was sourced from On-Chip memory
|
||||||
.
|
.
|
||||||
Counter:218 Name:TX_NC_TABORT
|
Counter:218 Name:TX_NC_TABORT
|
||||||
|
Short-Description:Aborted transactions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a non-constrained
|
A transaction abort has occurred in a non-constrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:219 Name:TX_C_TABORT_NO_SPECIAL
|
Counter:219 Name:TX_C_TABORT_NO_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode not using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is not using any special logic to allow the transaction
|
mode and the CPU is not using any special logic to allow the transaction
|
||||||
to complete
|
to complete
|
||||||
.
|
.
|
||||||
Counter:220 Name:TX_C_TABORT_SPECIAL
|
Counter:220 Name:TX_C_TABORT_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is using special logic to allow the transaction to
|
mode and the CPU is using special logic to allow the transaction to
|
||||||
@@ -307,10 +362,12 @@ complete
|
|||||||
# MT-diagnostic counter set
|
# MT-diagnostic counter set
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
Counter:448 Name:MT_DIAG_CYCLES_ONE_THR_ACTIVE
|
Counter:448 Name:MT_DIAG_CYCLES_ONE_THR_ACTIVE
|
||||||
|
Short-Description:Cycle count with one thread active
|
||||||
Description:
|
Description:
|
||||||
Cycle count with one thread active
|
Cycle count with one thread active
|
||||||
.
|
.
|
||||||
Counter:449 Name:MT_DIAG_CYCLES_TWO_THR_ACTIVE
|
Counter:449 Name:MT_DIAG_CYCLES_TWO_THR_ACTIVE
|
||||||
|
Short-Description:Cycle count with two threads active
|
||||||
Description:
|
Description:
|
||||||
Cycle count with two threads active
|
Cycle count with two threads active
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -19,272 +19,324 @@
|
|||||||
#
|
#
|
||||||
# Extended Counter Set
|
# Extended Counter Set
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
Counter:128 Name:L1D_WRITES_RO_EXCL
|
Counter:128 Name:L1D_RO_EXCL_WRITES
|
||||||
|
Short-Description:L1D Read-only Exclusive Writes
|
||||||
|
Description:
|
||||||
A directory write to the Level-1 Data cache where the line was
|
A directory write to the Level-1 Data cache where the line was
|
||||||
originally in a Read-Only state in the cache but has been updated
|
originally in a Read-Only state in the cache but has been updated
|
||||||
to be in the Exclusive state that allows stores to the cache line
|
to be in the Exclusive state that allows stores to the cache line
|
||||||
.
|
.
|
||||||
Counter:129 Name:DTLB2_WRITES
|
Counter:129 Name:DTLB2_WRITES
|
||||||
|
Short-Description:DTLB2 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation has been written into The Translation Lookaside
|
A translation has been written into The Translation Lookaside
|
||||||
Buffer 2 (TLB2) and the request was made by the data cache
|
Buffer 2 (TLB2) and the request was made by the data cache
|
||||||
.
|
.
|
||||||
Counter:130 Name:DTLB2_MISSES
|
Counter:130 Name:DTLB2_MISSES
|
||||||
|
Short-Description:DTLB2 Misses
|
||||||
Description:
|
Description:
|
||||||
A TLB2 miss is in progress for a request made by the data cache.
|
A TLB2 miss is in progress for a request made by the data cache.
|
||||||
Incremented by one for every TLB2 miss in progress for the Level-1
|
Incremented by one for every TLB2 miss in progress for the Level-1
|
||||||
Data cache on this cycle
|
Data cache on this cycle
|
||||||
.
|
.
|
||||||
Counter:131 Name:DTLB2_HPAGE_WRITES
|
Counter:131 Name:DTLB2_HPAGE_WRITES
|
||||||
|
Short-Description:DTLB2 One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry was written into the Combined Region and Segment
|
A translation entry was written into the Combined Region and Segment
|
||||||
Table Entry array in the Level-2 TLB for a one-megabyte page or a
|
Table Entry array in the Level-2 TLB for a one-megabyte page or a
|
||||||
Last Host Translation was done
|
Last Host Translation was done
|
||||||
.
|
.
|
||||||
Counter:132 Name:DTLB2_GPAGE_WRITES
|
Counter:132 Name:DTLB2_GPAGE_WRITES
|
||||||
|
Short-Description:DTLB2 Two-Gigabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry for a two-gigabyte page was written into the
|
A translation entry for a two-gigabyte page was written into the
|
||||||
Level-2 TLB
|
Level-2 TLB
|
||||||
.
|
.
|
||||||
Counter:133 Name:L1D_L2D_SOURCED_WRITES
|
Counter:133 Name:L1D_L2D_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2D Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the
|
A directory write to the Level-1 Data cache directory where the
|
||||||
returned cache line was sourced from the Level-2 Data cache
|
returned cache line was sourced from the Level-2 Data cache
|
||||||
.
|
.
|
||||||
Counter:134 Name:ITLB2_WRITES
|
Counter:134 Name:ITLB2_WRITES
|
||||||
|
Short-Description:ITLB2 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written into the Translation Lookaside
|
A translation entry has been written into the Translation Lookaside
|
||||||
Buffer 2 (TLB2) and the request was made by the instruction cache
|
Buffer 2 (TLB2) and the request was made by the instruction cache
|
||||||
.
|
.
|
||||||
Counter:135 Name:ITLB2_MISSES
|
Counter:135 Name:ITLB2_MISSES
|
||||||
|
Short-Description:ITLB2 Misses
|
||||||
Description:
|
Description:
|
||||||
A TLB2 miss is in progress for a request made by the instruction cache.
|
A TLB2 miss is in progress for a request made by the instruction cache.
|
||||||
Incremented by one for every TLB2 miss in progress for the Level-1
|
Incremented by one for every TLB2 miss in progress for the Level-1
|
||||||
Instruction cache in a cycle
|
Instruction cache in a cycle
|
||||||
.
|
.
|
||||||
Counter:136 Name:L1I_L2I_SOURCED_WRITES
|
Counter:136 Name:L1I_L2I_SOURCED_WRITES
|
||||||
|
Short-Description:L1I L2I Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from the Level-2 Instruction cache
|
returned cache line was sourced from the Level-2 Instruction cache
|
||||||
.
|
.
|
||||||
Counter:137 Name:TLB2_PTE_WRITES
|
Counter:137 Name:TLB2_PTE_WRITES
|
||||||
|
Short-Description:TLB2 PTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry was written into the Page Table Entry array in the
|
A translation entry was written into the Page Table Entry array in the
|
||||||
Level-2 TLB
|
Level-2 TLB
|
||||||
.
|
.
|
||||||
Counter:138 Name:TLB2_CRSTE_WRITES
|
Counter:138 Name:TLB2_CRSTE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE Writes
|
||||||
Description:
|
Description:
|
||||||
Translation entries were written into the Combined Region and Segment
|
Translation entries were written into the Combined Region and Segment
|
||||||
Table Entry array and the Page Table Entry array in the Level-2 TLB
|
Table Entry array and the Page Table Entry array in the Level-2 TLB
|
||||||
.
|
.
|
||||||
Counter:139 Name:TLB2_ENGINES_BUSY
|
Counter:139 Name:TLB2_ENGINES_BUSY
|
||||||
|
Short-Description:TLB2 Engines Busy
|
||||||
Description:
|
Description:
|
||||||
The number of Level-2 TLB translation engines busy in a cycle
|
The number of Level-2 TLB translation engines busy in a cycle
|
||||||
.
|
.
|
||||||
Counter:140 Name:TX_C_TEND
|
Counter:140 Name:TX_C_TEND
|
||||||
|
Short-Description:Completed TEND instructions in constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a constrained transactional-execution
|
A TEND instruction has completed in a constrained transactional-execution
|
||||||
mode
|
mode
|
||||||
.
|
.
|
||||||
Counter:141 Name:TX_NC_TEND
|
Counter:141 Name:TX_NC_TEND
|
||||||
|
Short-Description:Completed TEND instructions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a non-constrained
|
A TEND instruction has completed in a non-constrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:143 Name:L1C_TLB2_MISSES
|
Counter:143 Name:L1C_TLB2_MISSES
|
||||||
|
Short-Description:L1C TLB2 Misses
|
||||||
Description:
|
Description:
|
||||||
Increments by one for any cycle where a level-1 cache or level-2 TLB miss
|
Increments by one for any cycle where a level-1 cache or level-2 TLB miss
|
||||||
is in progress
|
is in progress
|
||||||
.
|
.
|
||||||
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Chip Level-3 cache without intervention
|
cache line was sourced from an On-Chip Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:145 Name:L1D_ONCHIP_MEMORY_SOURCED_WRITES
|
Counter:145 Name:L1D_ONCHIP_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Chip memory
|
cache line was sourced from On-Chip memory
|
||||||
.
|
.
|
||||||
Counter:146 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:146 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Chip Level-3 cache with intervention
|
cache line was sourced from an On-Chip Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:147 Name:L1D_ONCLUSTER_L3_SOURCED_WRITES
|
Counter:147 Name:L1D_ONCLUSTER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Cluster L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Cluster Level-3 cache withountervention
|
cache line was sourced from On-Cluster Level-3 cache withountervention
|
||||||
.
|
.
|
||||||
Counter:148 Name:L1D_ONCLUSTER_MEMORY_SOURCED_WRITES
|
Counter:148 Name:L1D_ONCLUSTER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Cluster Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Cluster memory
|
cache line was sourced from an On-Cluster memory
|
||||||
.
|
.
|
||||||
Counter:149 Name:L1D_ONCLUSTER_L3_SOURCED_WRITES_IV
|
Counter:149 Name:L1D_ONCLUSTER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Cluster L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On-Cluster Level-3 cache with intervention
|
cache line was sourced from an On-Cluster Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:150 Name:L1D_OFFCLUSTER_L3_SOURCED_WRITES
|
Counter:150 Name:L1D_OFFCLUSTER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Cluster L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Cluster Level-3 cache without
|
cache line was sourced from an Off-Cluster Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:151 Name:L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES
|
Counter:151 Name:L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Cluster Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from Off-Cluster memory
|
cache line was sourced from Off-Cluster memory
|
||||||
.
|
.
|
||||||
Counter:152 Name:L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV
|
Counter:152 Name:L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Cluster L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Cluster Level-3 cache with intervention
|
cache line was sourced from an Off-Cluster Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:153 Name:L1D_OFFDRAWER_L3_SOURCED_WRITES
|
Counter:153 Name:L1D_OFFDRAWER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Level-3 cache without
|
cache line was sourced from an Off-Drawer Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:154 Name:L1D_OFFDRAWER_MEMORY_SOURCED_WRITES
|
Counter:154 Name:L1D_OFFDRAWER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from Off-Drawer memory
|
cache line was sourced from Off-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:155 Name:L1D_OFFDRAWER_L3_SOURCED_WRITES_IV
|
Counter:155 Name:L1D_OFFDRAWER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Drawer L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off-Drawer Level-3 cache with intervention
|
cache line was sourced from an Off-Drawer Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:156 Name:L1D_ONDRAWER_L4_SOURCED_WRITES
|
Counter:156 Name:L1D_ONDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Drawer Level-4 cache
|
cache line was sourced from On-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:157 Name:L1D_OFFDRAWER_L4_SOURCED_WRITES
|
Counter:157 Name:L1D_OFFDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from Off-Drawer Level-4 cache
|
cache line was sourced from Off-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:158 Name:L1D_ONCHIP_L3_SOURCED_WRITES_RO
|
Counter:158 Name:L1D_ONCHIP_L3_SOURCED_WRITES_RO
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes read-only
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from On-Chip L3 but a read-only invalidate was
|
cache line was sourced from On-Chip L3 but a read-only invalidate was
|
||||||
done to remove other copies of the cache line
|
done to remove other copies of the cache line
|
||||||
.
|
.
|
||||||
Counter:162 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
Counter:162 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache ine was sourced from an On-Chip Level-3 cache without
|
returned cache ine was sourced from an On-Chip Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:163 Name:L1I_ONCHIP_MEMORY_SOURCED_WRITES
|
Counter:163 Name:L1I_ONCHIP_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache ine was sourced from On-Chip memory
|
returned cache ine was sourced from On-Chip memory
|
||||||
.
|
.
|
||||||
Counter:164 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:164 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache ine was sourced from an On-Chip Level-3 cache with
|
returned cache ine was sourced from an On-Chip Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:165 Name:L1I_ONCLUSTER_L3_SOURCED_WRITES
|
Counter:165 Name:L1I_ONCLUSTER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Cluster L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On-Cluster Level-3 cache without
|
returned cache line was sourced from an On-Cluster Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:166 Name:L1I_ONCLUSTER_MEMORY_SOURCED_WRITES
|
Counter:166 Name:L1I_ONCLUSTER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Cluster Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On-Cluster memory
|
returned cache line was sourced from an On-Cluster memory
|
||||||
.
|
.
|
||||||
Counter:167 Name:L1I_ONCLUSTER_L3_SOURCED_WRITES_IV
|
Counter:167 Name:L1I_ONCLUSTER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Cluster L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from On-Cluster Level-3 cache with
|
returned cache line was sourced from On-Cluster Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:168 Name:L1I_OFFCLUSTER_L3_SOURCED_WRITES
|
Counter:168 Name:L1I_OFFCLUSTER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Cluster L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off-Cluster Level-3 cache without
|
returned cache line was sourced from an Off-Cluster Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:169 Name:L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES
|
Counter:169 Name:L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Cluster Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from Off-Cluster memory
|
returned cache line was sourced from Off-Cluster memory
|
||||||
.
|
.
|
||||||
Counter:170 Name:L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV
|
Counter:170 Name:L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Cluster L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off-Cluster Level-3 cache with
|
returned cache line was sourced from an Off-Cluster Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:171 Name:L1I_OFFDRAWER_L3_SOURCED_WRITES
|
Counter:171 Name:L1I_OFFDRAWER_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off-Drawer Level-3 cache without
|
returned cache line was sourced from an Off-Drawer Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:172 Name:L1I_OFFDRAWER_MEMORY_SOURCED_WRITES
|
Counter:172 Name:L1I_OFFDRAWER_MEMORY_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from Off-Drawer memory
|
returned cache line was sourced from Off-Drawer memory
|
||||||
.
|
.
|
||||||
Counter:173 Name:L1I_OFFDRAWER_L3_SOURCED_WRITES_IV
|
Counter:173 Name:L1I_OFFDRAWER_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Drawer L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off-Drawer Level-3 cache with
|
returned cache line was sourced from an Off-Drawer Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:174 Name:L1I_ONDRAWER_L4_SOURCED_WRITES
|
Counter:174 Name:L1I_ONDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from On-Drawer Level-4 cache
|
returned cache line was sourced from On-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:175 Name:L1I_OFFDRAWER_L4_SOURCED_WRITES
|
Counter:175 Name:L1I_OFFDRAWER_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Drawer L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from Off-Drawer Level-4 cache
|
returned cache line was sourced from Off-Drawer Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:224 Name:BCD_DFP_EXECUTION_SLOTS
|
Counter:224 Name:BCD_DFP_EXECUTION_SLOTS
|
||||||
|
Short-Description:BCD DFP Execution Slots
|
||||||
Description:
|
Description:
|
||||||
Count of floating point execution slots used for finished Binary Coded
|
Count of floating point execution slots used for finished Binary Coded
|
||||||
Decimal to Decimal Floating Point conversions. Instructions: CDZT,
|
Decimal to Decimal Floating Point conversions. Instructions: CDZT,
|
||||||
CXZT, CZDT, CZXT
|
CXZT, CZDT, CZXT
|
||||||
.
|
.
|
||||||
Counter:225 Name:VX_BCD_EXECUTION_SLOTS
|
Counter:225 Name:VX_BCD_EXECUTION_SLOTS
|
||||||
|
Short-Description:VX BCD Execution Slots
|
||||||
Description:
|
Description:
|
||||||
Count of floating point execution slots used for finished vector arithmetic
|
Count of floating point execution slots used for finished vector arithmetic
|
||||||
Binary Coded Decimal instructions. Instructions: VAP, VSP, VMPVMSP, VDP,
|
Binary Coded Decimal instructions. Instructions: VAP, VSP, VMPVMSP, VDP,
|
||||||
VSDP, VRP, VLIP, VSRP, VPSOPVCP, VTP, VPKZ, VUPKZ, VCVB, VCVBG, VCVDVCVDG
|
VSDP, VRP, VLIP, VSRP, VPSOPVCP, VTP, VPKZ, VUPKZ, VCVB, VCVBG, VCVDVCVDG
|
||||||
.
|
.
|
||||||
Counter:226 Name:DECIMAL_INSTRUCTIONS
|
Counter:226 Name:DECIMAL_INSTRUCTIONS
|
||||||
|
Short-Description:Decimal Instructions
|
||||||
Description:
|
Description:
|
||||||
Decimal instructions dispatched. Instructions: CVB, CVD, AP, CP, DP, ED,
|
Decimal instructions dispatched. Instructions: CVB, CVD, AP, CP, DP, ED,
|
||||||
EDMK, MP, SRP, SP, ZAP
|
EDMK, MP, SRP, SP, ZAP
|
||||||
.
|
.
|
||||||
Counter:232 Name:LAST_HOST_TRANSLATIONS
|
Counter:232 Name:LAST_HOST_TRANSLATIONS
|
||||||
|
Short-Description:Last host translation done
|
||||||
Description:
|
Description:
|
||||||
Last Host Translation done
|
Last Host Translation done
|
||||||
.
|
.
|
||||||
Counter:243 Name:TX_NC_TABORT
|
Counter:243 Name:TX_NC_TABORT
|
||||||
|
Short-Description:Aborted transactions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a non-constrained
|
A transaction abort has occurred in a non-constrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:244 Name:TX_C_TABORT_NO_SPECIAL
|
Counter:244 Name:TX_C_TABORT_NO_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode not using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is not using any special logic to allow the transaction
|
mode and the CPU is not using any special logic to allow the transaction
|
||||||
to complete
|
to complete
|
||||||
.
|
.
|
||||||
Counter:245 Name:TX_C_TABORT_SPECIAL
|
Counter:245 Name:TX_C_TABORT_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is using special logic to allow the transaction to
|
mode and the CPU is using special logic to allow the transaction to
|
||||||
@@ -294,10 +346,12 @@ complete
|
|||||||
# MT-diagnostic counter set
|
# MT-diagnostic counter set
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
Counter:448 Name:MT_DIAG_CYCLES_ONE_THR_ACTIVE
|
Counter:448 Name:MT_DIAG_CYCLES_ONE_THR_ACTIVE
|
||||||
|
Short-Description:Cycle count with one thread active
|
||||||
Description:
|
Description:
|
||||||
Cycle count with one thread active
|
Cycle count with one thread active
|
||||||
.
|
.
|
||||||
Counter:449 Name:MT_DIAG_CYCLES_TWO_THR_ACTIVE
|
Counter:449 Name:MT_DIAG_CYCLES_TWO_THR_ACTIVE
|
||||||
|
Short-Description:Cycle count with two threads active
|
||||||
Description:
|
Description:
|
||||||
Cycle count with two threads active
|
Cycle count with two threads active
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -1,121 +1,145 @@
|
|||||||
Counter: 128 Name:L1D_L2_SOURCED_WRITES
|
Counter: 128 Name:L1D_L2_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from the Level-2 cache
|
cache line was sourced from the Level-2 cache
|
||||||
.
|
.
|
||||||
Counter: 129 Name:L1I_L2_SOURCED_WRITES
|
Counter: 129 Name:L1I_L2_SOURCED_WRITES
|
||||||
|
Short-Description:L1I L2 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from the Level-2 cache
|
cache line was sourced from the Level-2 cache
|
||||||
.
|
.
|
||||||
Counter: 130 Name:DTLB1_MISSES
|
Counter: 130 Name:DTLB1_MISSES
|
||||||
|
Short-Description:DTLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
||||||
a DTLB1 miss is in progress.
|
a DTLB1 miss is in progress.
|
||||||
.
|
.
|
||||||
Counter: 131 Name:ITLB1_MISSES
|
Counter: 131 Name:ITLB1_MISSES
|
||||||
|
Short-Description:ITLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
||||||
cycle a ITLB1 miss is in progress.
|
cycle a ITLB1 miss is in progress.
|
||||||
.
|
.
|
||||||
Counter: 133 Name:L2C_STORES_SENT
|
Counter: 133 Name:L2C_STORES_SENT
|
||||||
|
Short-Description:L2C Stores Sent
|
||||||
Description:
|
Description:
|
||||||
Incremented by one for every store sent to Level-2 cache
|
Incremented by one for every store sent to Level-2 cache
|
||||||
.
|
.
|
||||||
Counter: 134 Name:L1D_OFFBOOK_L3_SOURCED_WRITES
|
Counter: 134 Name:L1D_OFFBOOK_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Book L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-3 cache
|
cache line was sourced from an Off Book Level-3 cache
|
||||||
.
|
.
|
||||||
Counter: 135 Name:L1D_ONBOOK_L4_SOURCED_WRITES
|
Counter: 135 Name:L1D_ONBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from an On Book Level-4 cache
|
cache line was sourced from an On Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter: 136 Name:L1I_ONBOOK_L4_SOURCED_WRITES
|
Counter: 136 Name:L1I_ONBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from an On Book Level-4 cache
|
cache line was sourced from an On Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter: 137 Name:L1D_RO_EXCL_WRITES
|
Counter: 137 Name:L1D_RO_EXCL_WRITES
|
||||||
|
Short-Description:L1D Read-only Exclusive Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache where the line was originally
|
A directory write to the Level-1 D-Cache where the line was originally
|
||||||
in a Read-Only state in the cache but has been updated to be in the
|
in a Read-Only state in the cache but has been updated to be in the
|
||||||
Exclusive state that allows stores to the cache line
|
Exclusive state that allows stores to the cache line
|
||||||
.
|
.
|
||||||
Counter: 138 Name:L1D_OFFBOOK_L4_SOURCED_WRITES
|
Counter: 138 Name:L1D_OFFBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-4 cache
|
cache line was sourced from an Off Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter: 139 Name:L1I_OFFBOOK_L4_SOURCED_WRITES
|
Counter: 139 Name:L1I_OFFBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-4 cache
|
cache line was sourced from an Off Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter: 140 Name:DTLB1_HPAGE_WRITES
|
Counter: 140 Name:DTLB1_HPAGE_WRITES
|
||||||
|
Short-Description:DTLB1 One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer for a one-megabyte page
|
Lookaside Buffer for a one-megabyte page
|
||||||
.
|
.
|
||||||
Counter: 141 Name:L1D_LMEM_SOURCED_WRITES
|
Counter: 141 Name:L1D_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache where the installed cache line
|
A directory write to the Level-1 D-Cache where the installed cache line
|
||||||
was sourced from memory that is attached to the same book as the Data
|
was sourced from memory that is attached to the same book as the Data
|
||||||
cache (Local Memory)
|
cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter: 142 Name:L1I_LMEM_SOURCED_WRITES
|
Counter: 142 Name:L1I_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache where the installed cache
|
A directory write to the Level-1 I-Cache where the installed cache
|
||||||
line was sourced from memory that is attached to the same book as the
|
line was sourced from memory that is attached to the same book as the
|
||||||
Instruction cache (Local Memory)
|
Instruction cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter: 143 Name:L1I_OFFBOOK_L3_SOURCED_WRITES
|
Counter: 143 Name:L1I_OFFBOOK_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Book L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-3 cache
|
cache line was sourced from an Off Book Level-3 cache
|
||||||
.
|
.
|
||||||
Counter: 144 Name:DTLB1_WRITES
|
Counter: 144 Name:DTLB1_WRITES
|
||||||
|
Short-Description:DTLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer
|
Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter: 145 Name:ITLB1_WRITES
|
Counter: 145 Name:ITLB1_WRITES
|
||||||
|
Short-Description:ITLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Instruction
|
A translation entry has been written to the Level-1 Instruction
|
||||||
Translation Lookaside Buffer
|
Translation Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter: 146 Name:TLB2_PTE_WRITES
|
Counter: 146 Name:TLB2_PTE_WRITES
|
||||||
|
Short-Description:TLB2 PTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Page Table
|
A translation entry has been written to the Level-2 TLB Page Table
|
||||||
Entry arrays
|
Entry arrays
|
||||||
.
|
.
|
||||||
Counter: 147 Name:TLB2_CRSTE_HPAGE_WRITES
|
Counter: 147 Name:TLB2_CRSTE_HPAGE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays for a one-megabyte large page translation
|
Segment Table Entry arrays for a one-megabyte large page translation
|
||||||
.
|
.
|
||||||
Counter: 148 Name:TLB2_CRSTE_WRITES
|
Counter: 148 Name:TLB2_CRSTE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays
|
Segment Table Entry arrays
|
||||||
.
|
.
|
||||||
Counter: 150 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
Counter: 150 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from an On Chip Level-3 cache
|
cache line was sourced from an On Chip Level-3 cache
|
||||||
.
|
.
|
||||||
Counter: 152 Name:L1D_OFFCHIP_L3_SOURCED_WRITES
|
Counter: 152 Name:L1D_OFFCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache directory where the returned
|
A directory write to the Level-1 D-Cache directory where the returned
|
||||||
cache line was sourced from an Off Chip/On Book Level-3 cache
|
cache line was sourced from an Off Chip/On Book Level-3 cache
|
||||||
.
|
.
|
||||||
Counter: 153 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
Counter: 153 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from an On Chip Level-3 cache
|
cache line was sourced from an On Chip Level-3 cache
|
||||||
.
|
.
|
||||||
Counter: 155 Name:L1I_OFFCHIP_L3_SOURCED_WRITES
|
Counter: 155 Name:L1I_OFFCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 I-Cache directory where the returned
|
A directory write to the Level-1 I-Cache directory where the returned
|
||||||
cache line was sourced from an Off Chip/On Book Level-3 cache
|
cache line was sourced from an Off Chip/On Book Level-3 cache
|
||||||
|
|||||||
@@ -1,98 +1,117 @@
|
|||||||
Counter: 128 Name:DTLB1_MISSES
|
Counter: 128 Name:DTLB1_MISSES
|
||||||
|
Short-Description:DTLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
Level-1 Data TLB miss in progress. Incremented by one for every cycle
|
||||||
a DTLB1 miss is in progress.
|
a DTLB1 miss is in progress.
|
||||||
.
|
.
|
||||||
Counter:129 Name:ITLB1_MISSES
|
Counter:129 Name:ITLB1_MISSES
|
||||||
|
Short-Description:ITLB1 Misses
|
||||||
Description:
|
Description:
|
||||||
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
Level-1 Instruction TLB miss in progress. Incremented by one for every
|
||||||
cycle a ITLB1 miss is in progress.
|
cycle a ITLB1 miss is in progress.
|
||||||
.
|
.
|
||||||
Counter:130 Name:L1D_L2I_SOURCED_WRITES
|
Counter:130 Name:L1D_L2I_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2I Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from the Level-2 Instruction cache
|
cache line was sourced from the Level-2 Instruction cache
|
||||||
.
|
.
|
||||||
Counter:131 Name:L1I_L2I_SOURCED_WRITES
|
Counter:131 Name:L1I_L2I_SOURCED_WRITES
|
||||||
|
Short-Description:L1I L2I Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from the Level-2 Instruction cache
|
returned cache line was sourced from the Level-2 Instruction cache
|
||||||
.
|
.
|
||||||
Counter:132 Name:L1D_L2D_SOURCED_WRITES
|
Counter:132 Name:L1D_L2D_SOURCED_WRITES
|
||||||
|
Short-Description:L1D L2D Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from the Level-2 Data cache
|
cache line was sourced from the Level-2 Data cache
|
||||||
.
|
.
|
||||||
Counter:133 Name:DTLB1_WRITES
|
Counter:133 Name:DTLB1_WRITES
|
||||||
|
Short-Description:DTLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer
|
Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter:135 Name:L1D_LMEM_SOURCED_WRITES
|
Counter:135 Name:L1D_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache where the installed cache line
|
A directory write to the Level-1 Data cache where the installed cache line
|
||||||
was sourced from memory that is attached to the same book as the Data
|
was sourced from memory that is attached to the same book as the Data
|
||||||
cache (Local Memory)
|
cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter:137 Name:L1I_LMEM_SOURCED_WRITES
|
Counter:137 Name:L1I_LMEM_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Local Memory Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache where the installed cache
|
A directory write to the Level-1 Instruction cache where the installed cache
|
||||||
line was sourced from memory that is attached to the same book as the
|
line was sourced from memory that is attached to the same book as the
|
||||||
Instruction cache (Local Memory)
|
Instruction cache (Local Memory)
|
||||||
.
|
.
|
||||||
Counter:138 Name:L1D_RO_EXCL_WRITES
|
Counter:138 Name:L1D_RO_EXCL_WRITES
|
||||||
|
Short-Description:L1D Read-only Exclusive Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 D-Cache where the line was originally
|
A directory write to the Level-1 D-Cache where the line was originally
|
||||||
in a Read-Only state in the cache but has been updated to be in the
|
in a Read-Only state in the cache but has been updated to be in the
|
||||||
Exclusive state that allows stores to the cache line
|
Exclusive state that allows stores to the cache line
|
||||||
.
|
.
|
||||||
Counter:139 Name:DTLB1_HPAGE_WRITES
|
Counter:139 Name:DTLB1_HPAGE_WRITES
|
||||||
|
Short-Description:DTLB1 One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Data Translation
|
A translation entry has been written to the Level-1 Data Translation
|
||||||
Lookaside Buffer for a one-megabyte page
|
Lookaside Buffer for a one-megabyte page
|
||||||
.
|
.
|
||||||
Counter:140 Name:ITLB1_WRITES
|
Counter:140 Name:ITLB1_WRITES
|
||||||
|
Short-Description:ITLB1 Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-1 Instruction
|
A translation entry has been written to the Level-1 Instruction
|
||||||
Translation Lookaside Buffer
|
Translation Lookaside Buffer
|
||||||
.
|
.
|
||||||
Counter:141 Name:TLB2_PTE_WRITES
|
Counter:141 Name:TLB2_PTE_WRITES
|
||||||
|
Short-Description:TLB2 PTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Page Table
|
A translation entry has been written to the Level-2 TLB Page Table
|
||||||
Entry arrays
|
Entry arrays
|
||||||
.
|
.
|
||||||
Counter:142 Name:TLB2_CRSTE_HPAGE_WRITES
|
Counter:142 Name:TLB2_CRSTE_HPAGE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE One-Megabyte Page Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays for a one-megabyte large page translation
|
Segment Table Entry arrays for a one-megabyte large page translation
|
||||||
.
|
.
|
||||||
Counter:143 Name:TLB2_CRSTE_WRITES
|
Counter:143 Name:TLB2_CRSTE_WRITES
|
||||||
|
Short-Description:TLB2 CRSTE Writes
|
||||||
Description:
|
Description:
|
||||||
A translation entry has been written to the Level-2 TLB Common Region
|
A translation entry has been written to the Level-2 TLB Common Region
|
||||||
Segment Table Entry arrays
|
Segment Table Entry arrays
|
||||||
.
|
.
|
||||||
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
Counter:144 Name:L1D_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On Chip Level-3 cache without intervention
|
cache line was sourced from an On Chip Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:145 Name:L1D_OFFCHIP_L3_SOURCED_WRITES
|
Counter:145 Name:L1D_OFFCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off Chip/On Book Level-3 cache without
|
cache line was sourced from an Off Chip/On Book Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:146 Name:L1D_OFFBOOK_L3_SOURCED_WRITES
|
Counter:146 Name:L1D_OFFBOOK_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Book L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-3 cache without intervention
|
cache line was sourced from an Off Book Level-3 cache without intervention
|
||||||
.
|
.
|
||||||
Counter:147 Name:L1D_ONBOOK_L4_SOURCED_WRITES
|
Counter:147 Name:L1D_ONBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D On-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an On Book Level-4 cache
|
cache line was sourced from an On Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:148 Name:L1D_OFFBOOK_L4_SOURCED_WRITES
|
Counter:148 Name:L1D_OFFBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1D Off-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-4 cache
|
cache line was sourced from an Off Book Level-4 cache
|
||||||
@@ -104,16 +123,19 @@ cache line was sourced from an Off Book Level-4 cache
|
|||||||
# C .. constrained
|
# C .. constrained
|
||||||
#
|
#
|
||||||
Counter:149 Name:TX_NC_TEND
|
Counter:149 Name:TX_NC_TEND
|
||||||
|
Short-Description:Completed TEND instructions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a nonconstrained
|
A TEND instruction has completed in a nonconstrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:150 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:150 Name:L1D_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from a On Chip Level-3 cache with intervention
|
cache line was sourced from a On Chip Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:151 Name:L1D_OFFCHIP_L3_SOURCED_WRITES_IV
|
Counter:151 Name:L1D_OFFCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off Chip/On Book Level-3 cache with
|
cache line was sourced from an Off Chip/On Book Level-3 cache with
|
||||||
@@ -121,73 +143,86 @@ intervention
|
|||||||
.
|
.
|
||||||
# XXX Remove SOURCED from L1D_OFFBOOK_L3_SOURCED_WRITES...
|
# XXX Remove SOURCED from L1D_OFFBOOK_L3_SOURCED_WRITES...
|
||||||
Counter:152 Name:L1D_OFFBOOK_L3_SOURCED_WRITES_IV
|
Counter:152 Name:L1D_OFFBOOK_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1D Off-Book L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Data cache directory where the returned
|
A directory write to the Level-1 Data cache directory where the returned
|
||||||
cache line was sourced from an Off Book Level-3 cache with intervention
|
cache line was sourced from an Off Book Level-3 cache with intervention
|
||||||
.
|
.
|
||||||
Counter:153 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
Counter:153 Name:L1I_ONCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On Chip Level-3 cache without
|
returned cache line was sourced from an On Chip Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:154 Name:L1I_OFFCHIP_L3_SOURCED_WRITES
|
Counter:154 Name:L1I_OFFCHIP_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Chip L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off Chip/On Book Level-3 cache
|
returned cache line was sourced from an Off Chip/On Book Level-3 cache
|
||||||
without intervention
|
without intervention
|
||||||
.
|
.
|
||||||
Counter:155 Name:L1I_OFFBOOK_L3_SOURCED_WRITES
|
Counter:155 Name:L1I_OFFBOOK_L3_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Book L3 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off Book Level-3 cache without
|
returned cache line was sourced from an Off Book Level-3 cache without
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:156 Name:L1I_ONBOOK_L4_SOURCED_WRITES
|
Counter:156 Name:L1I_ONBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I On-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On Book Level-4 cache
|
returned cache line was sourced from an On Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:157 Name:L1I_OFFBOOK_L4_SOURCED_WRITES
|
Counter:157 Name:L1I_OFFBOOK_L4_SOURCED_WRITES
|
||||||
|
Short-Description:L1I Off-Book L4 Sourced Writes
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off Book Level-4 cache
|
returned cache line was sourced from an Off Book Level-4 cache
|
||||||
.
|
.
|
||||||
Counter:158 Name:TX_C_TEND
|
Counter:158 Name:TX_C_TEND
|
||||||
|
Short-Description:Completed TEND instructions in constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A TEND instruction has completed in a constrained transactional-execution
|
A TEND instruction has completed in a constrained transactional-execution
|
||||||
mode
|
mode
|
||||||
.
|
.
|
||||||
Counter:159 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
Counter:159 Name:L1I_ONCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I On-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an On Chip Level-3 cache with
|
returned cache line was sourced from an On Chip Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:160 Name:L1I_OFFCHIP_L3_SOURCED_WRITES_IV
|
Counter:160 Name:L1I_OFFCHIP_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Chip L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off Chip/On Book Level-3 cache
|
returned cache line was sourced from an Off Chip/On Book Level-3 cache
|
||||||
with intervention
|
with intervention
|
||||||
.
|
.
|
||||||
Counter:161 Name:L1I_OFFBOOK_L3_SOURCED_WRITES_IV
|
Counter:161 Name:L1I_OFFBOOK_L3_SOURCED_WRITES_IV
|
||||||
|
Short-Description:L1I Off-Book L3 Sourced Writes with Intervention
|
||||||
Description:
|
Description:
|
||||||
A directory write to the Level-1 Instruction cache directory where the
|
A directory write to the Level-1 Instruction cache directory where the
|
||||||
returned cache line was sourced from an Off Book Level-3 cache with
|
returned cache line was sourced from an Off Book Level-3 cache with
|
||||||
intervention
|
intervention
|
||||||
.
|
.
|
||||||
Counter:177 Name:TX_NC_TABORT
|
Counter:177 Name:TX_NC_TABORT
|
||||||
|
Short-Description:Aborted transactions in non-constrained TX mode
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a nonconstrained
|
A transaction abort has occurred in a nonconstrained
|
||||||
transactional-execution mode
|
transactional-execution mode
|
||||||
.
|
.
|
||||||
Counter:178 Name:TX_C_TABORT_NO_SPECIAL
|
Counter:178 Name:TX_C_TABORT_NO_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode not using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is not using any special logic to allow the transaction
|
mode and the CPU is not using any special logic to allow the transaction
|
||||||
to complete
|
to complete
|
||||||
.
|
.
|
||||||
Counter:179 Name:TX_C_TABORT_SPECIAL
|
Counter:179 Name:TX_C_TABORT_SPECIAL
|
||||||
|
Short-Description:Aborted transactions in constrained TX mode using special completion logic
|
||||||
Description:
|
Description:
|
||||||
A transaction abort has occurred in a constrained transactional-execution
|
A transaction abort has occurred in a constrained transactional-execution
|
||||||
mode and the CPU is using special logic to allow the transaction to
|
mode and the CPU is using special logic to allow the transaction to
|
||||||
|
|||||||
@@ -26,4 +26,5 @@
|
|||||||
2964 => 'cpum-cf-extended-z13.ctr',
|
2964 => 'cpum-cf-extended-z13.ctr',
|
||||||
2965 => 'cpum-cf-extended-z13.ctr',
|
2965 => 'cpum-cf-extended-z13.ctr',
|
||||||
3906 => 'cpum-cf-extended-z14.ctr',
|
3906 => 'cpum-cf-extended-z14.ctr',
|
||||||
|
3907 => 'cpum-cf-extended-z14.ctr',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
#
|
#
|
||||||
# Basic-sampling mode
|
# Basic-sampling mode
|
||||||
Counter: 0xB0000 Name:SF_CYCLES_BASIC
|
Counter: 0xB0000 Name:SF_CYCLES_BASIC
|
||||||
|
Short-Description:Sample CPU Cycles Using Basic-sampling Mode
|
||||||
Description:
|
Description:
|
||||||
Sample CPU cycles using basic-sampling mode
|
Sample CPU cycles using basic-sampling mode
|
||||||
.
|
.
|
||||||
# Diagnostic-sampling mode (includes basic-sampling)
|
# Diagnostic-sampling mode (includes basic-sampling)
|
||||||
Counter: 0xBD000 Name:SF_CYCLES_BASIC_DIAG
|
Counter: 0xBD000 Name:SF_CYCLES_BASIC_DIAG
|
||||||
|
Short-Description:Sample CPU Cycle Using Diagnostic-sampling Mode (not for ordinary use)
|
||||||
Description:
|
Description:
|
||||||
Sample CPU cycle using diagnostic-sampling mode (not for ordinary use)
|
Sample CPU cycle using diagnostic-sampling mode (not for ordinary use)
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ LDLIBS += -lm
|
|||||||
OBJECTS = daemon.o cpu.o info.o terms.o config.o main.o getopt.o mem.o
|
OBJECTS = daemon.o cpu.o info.o terms.o config.o main.o getopt.o mem.o
|
||||||
|
|
||||||
cpuplugd: $(OBJECTS)
|
cpuplugd: $(OBJECTS)
|
||||||
$(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f cpuplugd $(OBJECTS)
|
rm -f cpuplugd $(OBJECTS)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Config file parsing
|
* Config file parsing
|
||||||
*
|
*
|
||||||
* Copyright IBM Corp. 2007, 2017
|
* Copyright IBM Corp. 2007, 2018
|
||||||
*
|
*
|
||||||
* s390-tools is free software; you can redistribute it and/or modify
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
@@ -201,6 +201,7 @@ void parse_configfile(char *file)
|
|||||||
linebuffer);
|
linebuffer);
|
||||||
parse_configline(linebuffer);
|
parse_configline(linebuffer);
|
||||||
}
|
}
|
||||||
|
fclose(filp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#define NAME "cpuplugd"
|
#define NAME "cpuplugd"
|
||||||
#define MAX_HISTORY 100
|
#define MAX_HISTORY 100
|
||||||
#define PIDFILE "/var/run/cpuplugd.pid"
|
#define PIDFILE "/run/cpuplugd.pid"
|
||||||
#define LOCKFILE "/var/lock/cpuplugd.lock"
|
#define LOCKFILE "/var/lock/cpuplugd.lock"
|
||||||
#define PROCINFO_LINE 512
|
#define PROCINFO_LINE 512
|
||||||
#define CPUSTAT_SIZE 1024
|
#define CPUSTAT_SIZE 1024
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Print DASD uid
|
|||||||
This option prints the full uid of the DASD. When z/VM provides two
|
This option prints the full uid of the DASD. When z/VM provides two
|
||||||
virtual devices that are actually located on the same real device, the
|
virtual devices that are actually located on the same real device, the
|
||||||
first four tokens of the uid will be identical for both devices. z/VM
|
first four tokens of the uid will be identical for both devices. z/VM
|
||||||
may provide an additional token that allows to distinguish between
|
may provide an additional token that can be used to distinguish between
|
||||||
different minidisks. You need both support in the Linux kernel and
|
different minidisks. You need both support in the Linux kernel and
|
||||||
z/VM to receive such an additional token.
|
z/VM to receive such an additional token.
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ available by applying the PTFs for VM APAR VM64273 on z/VM 5.2.0 and higher.
|
|||||||
.BI "-u|--uid"
|
.BI "-u|--uid"
|
||||||
Print DASD uid without z/VM minidisk token
|
Print DASD uid without z/VM minidisk token
|
||||||
|
|
||||||
z/VM may provide an additional token that allows to distinguish
|
z/VM may provide an additional token that can be used to distinguish
|
||||||
between different minidisks (see --extended-uid option). To remain
|
between different minidisks (see --extended-uid option). To remain
|
||||||
compatibile with systems that were installed on older Linux or z/VM
|
compatibile with systems that were installed on older Linux or z/VM
|
||||||
levels, the -u option will print the uid excluding any z/VM-provided
|
levels, the -u option will print the uid excluding any z/VM-provided
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "lib/dasd_base.h"
|
#include "lib/dasd_base.h"
|
||||||
#include "lib/util_base.h"
|
#include "lib/util_base.h"
|
||||||
#include "lib/util_file.h"
|
#include "lib/util_file.h"
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/util_opt.h"
|
#include "lib/util_opt.h"
|
||||||
#include "lib/util_prg.h"
|
#include "lib/util_prg.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
@@ -192,18 +193,18 @@ static int dinfo_read_dasd_vlabel(char *device, struct volume_label *vlabel,
|
|||||||
char *space;
|
char *space;
|
||||||
|
|
||||||
if (dasd_get_blocksize(device, &blksize) != 0) {
|
if (dasd_get_blocksize(device, &blksize) != 0) {
|
||||||
printf("Unable to figure out block size.\n");
|
warnx("Unable to figure out block size");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dasd_get_info(device, &dasd_info) != 0) {
|
if (dasd_get_info(device, &dasd_info) != 0) {
|
||||||
printf("Unable to figure out DASD informations.\n");
|
warnx("Unable to figure out DASD information");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = open(device, O_RDONLY);
|
f = open(device, O_RDONLY);
|
||||||
if (f < 0) {
|
if (f < 0) {
|
||||||
printf("Could not open device node.\n");
|
warnx("Could not open device node");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +215,7 @@ static int dinfo_read_dasd_vlabel(char *device, struct volume_label *vlabel,
|
|||||||
bzero(vlabel, vlsize);
|
bzero(vlabel, vlsize);
|
||||||
|
|
||||||
if (read(f, vlabel, vlsize) != vlsize) {
|
if (read(f, vlabel, vlsize) != vlsize) {
|
||||||
printf("Could not read volume label.\n");
|
warnx("Could not read volume label");
|
||||||
goto error_close;
|
goto error_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,10 +256,9 @@ static void *dinfo_malloc(size_t size)
|
|||||||
void *result;
|
void *result;
|
||||||
|
|
||||||
result = malloc(size);
|
result = malloc(size);
|
||||||
if (result == NULL) {
|
if (result == NULL)
|
||||||
printf("Could not allocate %lld bytes of memory",
|
warnx("Could not allocate %lu bytes of memory", size);
|
||||||
(unsigned long long)size);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,16 +318,14 @@ static int dinfo_create_devnode(dev_t dev, char **devno)
|
|||||||
free(result);
|
free(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Error: Unable to create temporary device node");
|
warnx("Error: Unable to create temporary device node");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dinfo_free_devnode(char *device)
|
static void dinfo_free_devnode(char *device)
|
||||||
{
|
{
|
||||||
if (remove(device)) {
|
if (remove(device))
|
||||||
printf("Warning: Could not remove "
|
warnx("Warning: Could not remove temporary file %s", device);
|
||||||
"temporary file %s", device);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dinfo_extract_dev(dev_t *dev, char *str)
|
static int dinfo_extract_dev(dev_t *dev, char *str)
|
||||||
@@ -337,10 +335,10 @@ static int dinfo_extract_dev(dev_t *dev, char *str)
|
|||||||
int ma, mi;
|
int ma, mi;
|
||||||
|
|
||||||
bzero(tmp, RD_BUFFER_SIZE);
|
bzero(tmp, RD_BUFFER_SIZE);
|
||||||
strncpy(tmp, str, RD_BUFFER_SIZE);
|
util_strlcpy(tmp, str, RD_BUFFER_SIZE);
|
||||||
p = strchr(tmp, ':');
|
p = strchr(tmp, ':');
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
printf("Error: unable to extract major/minor\n");
|
warnx("Error: unable to extract major/minor");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,7 +357,7 @@ static int dinfo_get_dev_from_blockdev(char *blockdev, dev_t *dev)
|
|||||||
|
|
||||||
readbuf = dinfo_malloc(RD_BUFFER_SIZE);
|
readbuf = dinfo_malloc(RD_BUFFER_SIZE);
|
||||||
if (!readbuf) {
|
if (!readbuf) {
|
||||||
printf("Error: Not enough memory to allocate readbuffer\n");
|
warnx("Error: Not enough memory to allocate readbuffer");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (util_file_read_line(readbuf, RD_BUFFER_SIZE,
|
if (util_file_read_line(readbuf, RD_BUFFER_SIZE,
|
||||||
@@ -490,7 +488,7 @@ static int dinfo_get_uid_from_devnode(char **uidfile, char *devnode)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (stat(devnode, &stat_buffer) != 0) {
|
if (stat(devnode, &stat_buffer) != 0) {
|
||||||
printf("Error: could not stat %s\n", devnode);
|
warnx("Error: could not stat %s", devnode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,13 +497,13 @@ static int dinfo_get_uid_from_devnode(char **uidfile, char *devnode)
|
|||||||
|
|
||||||
directory = opendir("/sys/block/");
|
directory = opendir("/sys/block/");
|
||||||
if (directory == NULL) {
|
if (directory == NULL) {
|
||||||
printf("Error: could not open directory /sys/block\n");
|
warnx("Error: could not open directory /sys/block");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
readbuf = dinfo_malloc(RD_BUFFER_SIZE);
|
readbuf = dinfo_malloc(RD_BUFFER_SIZE);
|
||||||
if (!readbuf) {
|
if (!readbuf) {
|
||||||
printf("Error: Not enough memory to allocate readbuffer\n");
|
warnx("Error: Not enough memory to allocate readbuffer");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,25 +605,23 @@ int main(int argc, char *argv[])
|
|||||||
sscanf(uname_buf.release, "%d.%d", &version, &release);
|
sscanf(uname_buf.release, "%d.%d", &version, &release);
|
||||||
if (strcmp(uname_buf.sysname, "Linux") ||
|
if (strcmp(uname_buf.sysname, "Linux") ||
|
||||||
version < 2 || (version == 2 && release < 6)) {
|
version < 2 || (version == 2 && release < 6)) {
|
||||||
printf("%s %d.%d is not supported\n", uname_buf.sysname,
|
warnx("%s %d.%d is not supported", uname_buf.sysname,
|
||||||
version, release);
|
version, release);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!busid && !blockdev && !devnode) {
|
if (!busid && !blockdev && !devnode) {
|
||||||
printf("Error: please specify a device using either -b, -i "
|
warnx("Error: please specify a device using either -b, -i or -d");
|
||||||
"or -d\n");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((busid && blockdev) || (busid && devnode) || (blockdev && devnode)) {
|
if ((busid && blockdev) || (busid && devnode) || (blockdev && devnode)) {
|
||||||
printf("Error: please specify device only once, either -b, -i "
|
warnx("Error: please specify device only once, either -b, -i or -d");
|
||||||
"or -d\n");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!print_uid && !print_extended_uid && !print_vlabel) {
|
if (!print_uid && !print_extended_uid && !print_vlabel) {
|
||||||
printf("Error: no action specified (e.g. -u)\n");
|
warnx("Error: no action specified (e.g. -u)");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,7 +714,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
printf("Error: could not read unique DASD ID\n");
|
warnx("Error: could not read unique DASD ID");
|
||||||
rc = 1;
|
rc = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ dasdview_print_volser(dasdview_info_t *info)
|
|||||||
strncpy(volser, vlabel.volid, 6);
|
strncpy(volser, vlabel.volid, 6);
|
||||||
vtoc_ebcdic_dec(volser, volser, 6);
|
vtoc_ebcdic_dec(volser, volser, 6);
|
||||||
} else {
|
} else {
|
||||||
strncpy(volser, " ", 6);
|
memcpy(volser, " ", 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%6.6s\n", volser);
|
printf("%6.6s\n", volser);
|
||||||
@@ -1741,7 +1741,7 @@ static void dasdview_print_vtoc_raw(dasdview_info_t *info)
|
|||||||
" rc=%d\n", rc);
|
" rc=%d\n", rc);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
rc = lzds_dasd_read_rawvtoc(info->dasd);
|
rc = lzds_dasd_alloc_rawvtoc(info->dasd);
|
||||||
if (rc == EINVAL) {
|
if (rc == EINVAL) {
|
||||||
zt_error_print("dasdview: Cannot read VTOC because disk does"
|
zt_error_print("dasdview: Cannot read VTOC because disk does"
|
||||||
" not contain valid VOL1 label.\n",
|
" not contain valid VOL1 label.\n",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static void set_time(char *dest, size_t len, time_t value)
|
|||||||
#define SET_TIME_FIELD(obj, name, value) \
|
#define SET_TIME_FIELD(obj, name, value) \
|
||||||
set_time((obj)->name, sizeof((obj)->name), (time_t) (value))
|
set_time((obj)->name, sizeof((obj)->name), (time_t) (value))
|
||||||
#define SET_STR_FIELD(obj, name, value) \
|
#define SET_STR_FIELD(obj, name, value) \
|
||||||
strncpy((obj)->name, (value), sizeof((obj)->name))
|
util_strlcpy((obj)->name, (value), sizeof((obj)->name))
|
||||||
|
|
||||||
/* Initialize the tar file @header with the provided data */
|
/* Initialize the tar file @header with the provided data */
|
||||||
static void init_header(struct tar_header *header, const char *filename,
|
static void init_header(struct tar_header *header, const char *filename,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
DAEMON=cpacfstatsd
|
DAEMON=cpacfstatsd
|
||||||
DAEMON_PATH=/usr/sbin/cpacfstatsd
|
DAEMON_PATH=/usr/sbin/cpacfstatsd
|
||||||
RUN_PID_FILE=/var/run/cpacfstatsd.pid
|
RUN_PID_FILE=/run/cpacfstatsd.pid
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
DAEMON=cpuplugd
|
DAEMON=cpuplugd
|
||||||
DAEMON_PATH=/usr/sbin/cpuplugd
|
DAEMON_PATH=/usr/sbin/cpuplugd
|
||||||
CONFIG_FILE=/etc/cpuplugd.conf
|
CONFIG_FILE=/etc/cpuplugd.conf
|
||||||
RUN_PID_FILE=/var/run/cpuplugd.pid
|
RUN_PID_FILE=/run/cpuplugd.pid
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
OPTIONS="-c $CONFIG_FILE"
|
OPTIONS="-c $CONFIG_FILE"
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
|
|||||||
CMDFULL=$0
|
CMDFULL=$0
|
||||||
CMD="dumpconf"
|
CMD="dumpconf"
|
||||||
LOCKFILE=/var/lock/$CMD
|
LOCKFILE=/var/lock/$CMD
|
||||||
PIDFILE=/var/run/$CMD.pid
|
PIDFILE=/run/$CMD.pid
|
||||||
ERRMSG="Check $DUMP_CONFIG_FILE!"
|
ERRMSG="Check $DUMP_CONFIG_FILE!"
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ PROCD=mon_procd
|
|||||||
FSSTATD_PATH=/usr/sbin/$FSSTATD
|
FSSTATD_PATH=/usr/sbin/$FSSTATD
|
||||||
PROCD_PATH=/usr/sbin/$PROCD
|
PROCD_PATH=/usr/sbin/$PROCD
|
||||||
CONFIG_FILE=/etc/sysconfig/$DAEMON
|
CONFIG_FILE=/etc/sysconfig/$DAEMON
|
||||||
FSSTATD_PID_FILE=/var/run/$FSSTATD.pid
|
FSSTATD_PID_FILE=/run/$FSSTATD.pid
|
||||||
PROCD_PID_FILE=/var/run/$PROCD.pid
|
PROCD_PID_FILE=/run/$PROCD.pid
|
||||||
|
|
||||||
# source function library
|
# source function library
|
||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
|
|||||||
2
etc/modules-load.d/s390-pkey.conf
Normal file
2
etc/modules-load.d/s390-pkey.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Load protected key support module on s390 early at boot
|
||||||
|
pkey
|
||||||
@@ -7,7 +7,7 @@ SUBSYSTEM!="block", GOTO="ra_end"
|
|||||||
|
|
||||||
ACTION!="add", GOTO="ra_change"
|
ACTION!="add", GOTO="ra_change"
|
||||||
# on device add set initial readahead to 512 (instead of in kernel 128)
|
# on device add set initial readahead to 512 (instead of in kernel 128)
|
||||||
KERNEL=="sd*[!0-9]", WAIT_FOR="queue/read_ahead_kb", ATTR{queue/read_ahead_kb}="512"
|
KERNEL=="sd*[!0-9]", TEST=="queue/read_ahead_kb", ATTR{queue/read_ahead_kb}="512"
|
||||||
|
|
||||||
LABEL="ra_change"
|
LABEL="ra_change"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* fdasd - Create or modify partitions on ECKD DASDs
|
* fdasd - Create or modify partitions on ECKD DASDs
|
||||||
*
|
*
|
||||||
* Copyright IBM Corp. 2001, 2017
|
* Copyright IBM Corp. 2001, 2018
|
||||||
*
|
*
|
||||||
* s390-tools is free software; you can redistribute it and/or modify
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
@@ -258,7 +258,7 @@ static void fdasd_check_volser(char *volser, int devno)
|
|||||||
{
|
{
|
||||||
int from, to;
|
int from, to;
|
||||||
|
|
||||||
for (from = 0, to = 0; volser[from] && from < VOLSER_LENGTH; from++)
|
for (from = 0, to = 0; from < VOLSER_LENGTH && volser[from]; from++)
|
||||||
if ((volser[from] >= 0x23 &&
|
if ((volser[from] >= 0x23 &&
|
||||||
volser[from] <= 0x25) || /* # $ % */
|
volser[from] <= 0x25) || /* # $ % */
|
||||||
(volser[from] >= 0x30 &&
|
(volser[from] >= 0x30 &&
|
||||||
@@ -727,9 +727,9 @@ static int fdasd_parse_conffile(fdasd_anchor_t *anc,
|
|||||||
|
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
rc = read(fd, buffer, sizeof(buffer) - 1);
|
rc = read(fd, buffer, sizeof(buffer) - 1);
|
||||||
|
close(fd);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
close(fd);
|
|
||||||
|
|
||||||
for (i = 0; i < rc; i++)
|
for (i = 0; i < rc; i++)
|
||||||
buffer[i] = toupper(buffer[i]);
|
buffer[i] = toupper(buffer[i]);
|
||||||
@@ -1257,7 +1257,7 @@ static void fdasd_write_vtoc_labels(fdasd_anchor_t *anc)
|
|||||||
printf("DSCBs: ");
|
printf("DSCBs: ");
|
||||||
|
|
||||||
blk = (cchhb2blk(&anc->vlabel->vtoc, &geo) - 1) * anc->blksize;
|
blk = (cchhb2blk(&anc->vlabel->vtoc, &geo) - 1) * anc->blksize;
|
||||||
if (blk <= 0)
|
if (cchhb2blk(&anc->vlabel->vtoc, &geo) == 0 || blk == 0)
|
||||||
fdasd_error(anc, vlabel_corrupted, "");
|
fdasd_error(anc, vlabel_corrupted, "");
|
||||||
maxblk = blk + anc->blksize * 9; /* f4+f5+f7+3*f8+3*f9 */
|
maxblk = blk + anc->blksize * 9; /* f4+f5+f7+3*f8+3*f9 */
|
||||||
|
|
||||||
@@ -1310,7 +1310,7 @@ static void fdasd_write_vtoc_labels(fdasd_anchor_t *anc)
|
|||||||
volser[VOLSER_LENGTH] = ' ';
|
volser[VOLSER_LENGTH] = ' ';
|
||||||
strncpy(c1, volser, VOLSER_LENGTH + 1);
|
strncpy(c1, volser, VOLSER_LENGTH + 1);
|
||||||
c1 = strchr(ch, ' ');
|
c1 = strchr(ch, ' ');
|
||||||
strncpy(c1, s2, 31);
|
memcpy(c1, s2, 31);
|
||||||
} else {
|
} else {
|
||||||
if (get_part_type_by_dsname(ch, &part_info->type))
|
if (get_part_type_by_dsname(ch, &part_info->type))
|
||||||
part_info->type = PARTITION_NATIVE;
|
part_info->type = PARTITION_NATIVE;
|
||||||
@@ -1321,23 +1321,23 @@ static void fdasd_write_vtoc_labels(fdasd_anchor_t *anc)
|
|||||||
|
|
||||||
setpos(anc, k, i - 1);
|
setpos(anc, k, i - 1);
|
||||||
|
|
||||||
strncpy(ch, "LINUX.V "
|
memcpy(ch, "LINUX.V "
|
||||||
" ", 44);
|
" ", 44);
|
||||||
|
|
||||||
strncpy(volser, anc->vlabel->volid, VOLSER_LENGTH);
|
strncpy(volser, anc->vlabel->volid, VOLSER_LENGTH);
|
||||||
vtoc_ebcdic_dec(volser, volser, VOLSER_LENGTH);
|
vtoc_ebcdic_dec(volser, volser, VOLSER_LENGTH);
|
||||||
strncpy(c1, volser, VOLSER_LENGTH);
|
memcpy(c1, volser, VOLSER_LENGTH);
|
||||||
|
|
||||||
c1 = strchr(ch, ' ');
|
c1 = strchr(ch, ' ');
|
||||||
strncpy(c1, ".PART", 5);
|
memcpy(c1, ".PART", 5);
|
||||||
c1 += 5;
|
c1 += 5;
|
||||||
|
|
||||||
sprintf(dsno, "%04d.", k + 1);
|
sprintf(dsno, "%04d.", k + 1);
|
||||||
strncpy(c1, dsno, 5);
|
memcpy(c1, dsno, 5);
|
||||||
c1 += 5;
|
c1 += 5;
|
||||||
|
|
||||||
get_part_dsname_by_type(part_info->type, &dsname);
|
get_part_dsname_by_type(part_info->type, &dsname);
|
||||||
strncpy(c1, dsname, strlen(dsname)); /* We don't want \0 */
|
memcpy(c1, dsname, strlen(dsname)); /* We don't want \0 */
|
||||||
}
|
}
|
||||||
vtoc_ebcdic_enc(ch, ch, 44);
|
vtoc_ebcdic_enc(ch, ch, 44);
|
||||||
if (anc->verbose)
|
if (anc->verbose)
|
||||||
@@ -1636,7 +1636,7 @@ static void fdasd_change_part_type(fdasd_anchor_t *anc)
|
|||||||
|
|
||||||
ch = strstr(part_info->f1->DS1DSNAM, "PART") + 9;
|
ch = strstr(part_info->f1->DS1DSNAM, "PART") + 9;
|
||||||
if (ch != NULL)
|
if (ch != NULL)
|
||||||
strncpy(ch, str, 6);
|
memcpy(ch, str, 6);
|
||||||
vtoc_ebcdic_enc(part_info->f1->DS1DSNAM, part_info->f1->DS1DSNAM, 44);
|
vtoc_ebcdic_enc(part_info->f1->DS1DSNAM, part_info->f1->DS1DSNAM, 44);
|
||||||
anc->vtoc_changed++;
|
anc->vtoc_changed++;
|
||||||
}
|
}
|
||||||
@@ -1994,7 +1994,7 @@ static int fdasd_check_volume(fdasd_anchor_t *anc)
|
|||||||
printf(" VOL1\n");
|
printf(" VOL1\n");
|
||||||
|
|
||||||
blk = (cchhb2blk(&vlabel->vtoc, &geo) - 1) * anc->blksize;
|
blk = (cchhb2blk(&vlabel->vtoc, &geo) - 1) * anc->blksize;
|
||||||
if (blk > 0) {
|
if (cchhb2blk(&vlabel->vtoc, &geo) > 0 && blk > 0) {
|
||||||
rc = fdasd_valid_vtoc_pointer(anc, blk);
|
rc = fdasd_valid_vtoc_pointer(anc, blk);
|
||||||
|
|
||||||
if (anc->print_table && (rc < 0))
|
if (anc->print_table && (rc < 0))
|
||||||
|
|||||||
@@ -31,12 +31,13 @@ LDLIBS += $(FUSE_LDLIBS) -lpthread -lrt -ldl -lm
|
|||||||
|
|
||||||
OBJECTS = hmcdrvfs.o
|
OBJECTS = hmcdrvfs.o
|
||||||
|
|
||||||
|
libs = $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
all: check_dep hmcdrvfs
|
all: check_dep hmcdrvfs
|
||||||
|
|
||||||
$(OBJECTS): Makefile
|
$(OBJECTS): Makefile
|
||||||
|
|
||||||
hmcdrvfs: $(OBJECTS)
|
hmcdrvfs: $(OBJECTS) $(libs)
|
||||||
|
|
||||||
install: all install-scripts
|
install: all install-scripts
|
||||||
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 hmcdrvfs \
|
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 hmcdrvfs \
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
#define HMCDRV_FUSE_LOGNAME "hmcdrvfs" /* log prefix */
|
#define HMCDRV_FUSE_LOGNAME "hmcdrvfs" /* log prefix */
|
||||||
@@ -276,7 +277,7 @@ static void hmcdrv_cache_symlink(struct hmcdrv_fuse_file *fp,
|
|||||||
fp->symlnk = malloc(HMCDRV_FUSE_MAXPATH);
|
fp->symlnk = malloc(HMCDRV_FUSE_MAXPATH);
|
||||||
|
|
||||||
if (fp->symlnk != NULL) {
|
if (fp->symlnk != NULL) {
|
||||||
strncpy(fp->symlnk, symlink, HMCDRV_FUSE_MAXPATH);
|
util_strlcpy(fp->symlnk, symlink, HMCDRV_FUSE_MAXPATH);
|
||||||
fp->symlnk[HMCDRV_FUSE_MAXPATH - 1] = '\0';
|
fp->symlnk[HMCDRV_FUSE_MAXPATH - 1] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -483,8 +484,7 @@ static ssize_t hmcdrv_ftp_transfer(struct hmcdrv_fuse_file *fp, char *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_offset += retlen;
|
current_offset += retlen;
|
||||||
strncpy(last_ftpcmd, fp->ftpcmd, HMCDRV_FUSE_MAXCMDLEN);
|
util_strlcpy(last_ftpcmd, fp->ftpcmd, HMCDRV_FUSE_MAXCMDLEN);
|
||||||
last_ftpcmd[HMCDRV_FUSE_MAXCMDLEN - 1] = '\0';
|
|
||||||
return retlen;
|
return retlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -821,10 +821,13 @@ static char *hmcdrv_parse_line(char *line, char *namebuf,
|
|||||||
if ((*line != '\0') && (*line != '\n')) {
|
if ((*line != '\0') && (*line != '\n')) {
|
||||||
field = hmcdrv_parse_ntoken(field, line, &attr);
|
field = hmcdrv_parse_ntoken(field, line, &attr);
|
||||||
|
|
||||||
while ((*line != '\0') &&
|
while ((*line != '\0') && (*line != '\n')) {
|
||||||
(*line != '\n') &&
|
if (isspace(*line))
|
||||||
!isspace(*line))
|
break;
|
||||||
|
if (field == 1 && isdigit(*line))
|
||||||
|
break;
|
||||||
++line; /* search end of field */
|
++line; /* search end of field */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} /* while */
|
} /* while */
|
||||||
|
|
||||||
@@ -850,13 +853,12 @@ static char *hmcdrv_parse_line(char *line, char *namebuf,
|
|||||||
*arrow = '\0';
|
*arrow = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(namebuf, attr.fname, bufsize);
|
util_strlcpy(namebuf, attr.fname, bufsize);
|
||||||
namebuf[bufsize - 1] = '\0'; /* safety */
|
|
||||||
|
|
||||||
if (arrow == NULL) {
|
if (arrow == NULL) {
|
||||||
symlink[0] = '\0';
|
symlink[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
strncpy(symlink, arrow + 4, HMCDRV_FUSE_MAXPATH);
|
util_strlcpy(symlink, arrow + 4, HMCDRV_FUSE_MAXPATH);
|
||||||
*arrow = ' '; /* restore */
|
*arrow = ' '; /* restore */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1145,8 +1147,7 @@ static int hmcdrv_fuse_readlink(const char *path, char *buf, size_t size)
|
|||||||
if (!S_ISLNK(fp->st.st_mode)) {
|
if (!S_ISLNK(fp->st.st_mode)) {
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
strncpy(buf, fp->symlnk, size);
|
util_strlcpy(buf, fp->symlnk, size);
|
||||||
buf[size - 1] = '\0';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1335,7 +1336,7 @@ static int hmcdrv_fuse_main(struct fuse_args *args)
|
|||||||
*/
|
*/
|
||||||
static void hmcdrv_fuse_usage(const char *progname)
|
static void hmcdrv_fuse_usage(const char *progname)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stdout,
|
||||||
"Usage: %s MOUNTPOINT [OPTIONS]\n\n"
|
"Usage: %s MOUNTPOINT [OPTIONS]\n\n"
|
||||||
"Use the %s command to read files from a HMC drive DVD.\n"
|
"Use the %s command to read files from a HMC drive DVD.\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -1447,7 +1448,7 @@ static int hmcdrv_fuse_optproc(void *data, const char *arg,
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case HMCDRV_FUSE_OPTKEY_VERSION:
|
case HMCDRV_FUSE_OPTKEY_VERSION:
|
||||||
fprintf(stderr, HMCDRV_FUSE_LOGHEAD
|
fprintf(stdout, HMCDRV_FUSE_LOGHEAD
|
||||||
"HMC drive DVD file system, version %s\n"
|
"HMC drive DVD file system, version %s\n"
|
||||||
"Copyright IBM Corp. 2015, 2017\n",
|
"Copyright IBM Corp. 2015, 2017\n",
|
||||||
HMCDRV_FUSE_RELEASE);
|
HMCDRV_FUSE_RELEASE);
|
||||||
@@ -1455,6 +1456,16 @@ static int hmcdrv_fuse_optproc(void *data, const char *arg,
|
|||||||
|
|
||||||
case HMCDRV_FUSE_OPTKEY_HELP:
|
case HMCDRV_FUSE_OPTKEY_HELP:
|
||||||
hmcdrv_fuse_usage(outargs->argv[0]);
|
hmcdrv_fuse_usage(outargs->argv[0]);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Usage output needs to go to stdout to be consistent with
|
||||||
|
* coding guidelines. FUSE versions before 3.0.0 print help
|
||||||
|
* output to stderr. Redirect stderr to stdout here to enforce
|
||||||
|
* consistent behavior.
|
||||||
|
*/
|
||||||
|
fflush(stderr);
|
||||||
|
dup2(STDOUT_FILENO, STDERR_FILENO);
|
||||||
|
|
||||||
fuse_opt_add_arg(outargs, "-ho");
|
fuse_opt_add_arg(outargs, "-ho");
|
||||||
hmcdrv_fuse_main(outargs);
|
hmcdrv_fuse_main(outargs);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
@@ -55,8 +55,7 @@ struct l_x_sys_hdr {
|
|||||||
|
|
||||||
static inline void l_sys_hdr__sys_name(struct l_x_sys_hdr *hdr, char *name)
|
static inline void l_sys_hdr__sys_name(struct l_x_sys_hdr *hdr, char *name)
|
||||||
{
|
{
|
||||||
memcpy(name, hdr->sys_name, LPAR_NAME_LEN);
|
ht_ebcdic_to_ascii(hdr->sys_name, name, LPAR_NAME_LEN);
|
||||||
ht_ebcdic_to_ascii(name, LPAR_NAME_LEN);
|
|
||||||
name[LPAR_NAME_LEN] = 0;
|
name[LPAR_NAME_LEN] = 0;
|
||||||
ht_strstrip(name);
|
ht_strstrip(name);
|
||||||
}
|
}
|
||||||
@@ -176,7 +175,6 @@ static void l_sd_cpu_phys_fill(struct sd_sys *sys,
|
|||||||
sd_cpu_state_set(cpu, SD_CPU_STATE_UNKNOWN);
|
sd_cpu_state_set(cpu, SD_CPU_STATE_UNKNOWN);
|
||||||
}
|
}
|
||||||
sd_cpu_mgm_time_us_set(cpu, cpu_info->mgm_time);
|
sd_cpu_mgm_time_us_set(cpu, cpu_info->mgm_time);
|
||||||
sd_cpu_real_type_set(cpu, cpu_type);
|
|
||||||
sd_cpu_commit(cpu);
|
sd_cpu_commit(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -245,8 +245,7 @@ static void l_sd_sys_root_fill(struct sd_sys *sys)
|
|||||||
struct sd_sys *guest;
|
struct sd_sys *guest;
|
||||||
|
|
||||||
guest_name[NAME_LEN] = 0;
|
guest_name[NAME_LEN] = 0;
|
||||||
memcpy(guest_name, data->guest_name, NAME_LEN);
|
ht_ebcdic_to_ascii(data->guest_name, guest_name, NAME_LEN);
|
||||||
ht_ebcdic_to_ascii(guest_name, NAME_LEN);
|
|
||||||
ht_strstrip(guest_name);
|
ht_strstrip(guest_name);
|
||||||
|
|
||||||
guest = sd_sys_get(sys, guest_name);
|
guest = sd_sys_get(sys, guest_name);
|
||||||
|
|||||||
@@ -98,9 +98,15 @@ void *ht_realloc(void *old_ptr, size_t size)
|
|||||||
/*
|
/*
|
||||||
* Convert EBCDIC string to ASCII
|
* Convert EBCDIC string to ASCII
|
||||||
*/
|
*/
|
||||||
void ht_ebcdic_to_ascii(char *inout, size_t len)
|
void ht_ebcdic_to_ascii(char *in, char *out, size_t size)
|
||||||
{
|
{
|
||||||
iconv(l_iconv_ebcdic_ascii, &inout, &len, &inout, &len);
|
size_t size_out = size;
|
||||||
|
size_t size_in = size;
|
||||||
|
size_t rc;
|
||||||
|
|
||||||
|
rc = iconv(l_iconv_ebcdic_ascii, &in, &size_in, &out, &size_out);
|
||||||
|
if (rc == (size_t) -1)
|
||||||
|
ERR_EXIT_ERRNO("Code page translation EBCDIC-ASCII failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "lib/util_base.h"
|
#include "lib/util_base.h"
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
#define G0(x) MAX(0, (s64) (x))
|
#define G0(x) MAX(0, (s64) (x))
|
||||||
@@ -29,7 +30,7 @@ extern char *ht_strstrip(char *str);
|
|||||||
extern char *ht_strdup(const char *str);
|
extern char *ht_strdup(const char *str);
|
||||||
extern void ht_print_head(const char *sys);
|
extern void ht_print_head(const char *sys);
|
||||||
extern void ht_print_help_icon(void);
|
extern void ht_print_help_icon(void);
|
||||||
extern void ht_ebcdic_to_ascii(char *inout, size_t len);
|
extern void ht_ebcdic_to_ascii(char *in, char *out, size_t len);
|
||||||
extern char *ht_mount_point_get(const char *fs_type);
|
extern char *ht_mount_point_get(const char *fs_type);
|
||||||
extern u64 ht_ext_tod_2_us(void *tod_ext);
|
extern u64 ht_ext_tod_2_us(void *tod_ext);
|
||||||
extern void ht_print_time(void);
|
extern void ht_print_time(void);
|
||||||
|
|||||||
@@ -195,7 +195,6 @@ struct sd_cpu {
|
|||||||
struct sd_info i;
|
struct sd_info i;
|
||||||
char id[9];
|
char id[9];
|
||||||
struct sd_cpu_type *type;
|
struct sd_cpu_type *type;
|
||||||
char real_type[CPU_TYPE_ID_LEN];
|
|
||||||
struct sd_cpu_info d1;
|
struct sd_cpu_info d1;
|
||||||
struct sd_cpu_info d2;
|
struct sd_cpu_info d2;
|
||||||
struct sd_cpu_info *d_cur;
|
struct sd_cpu_info *d_cur;
|
||||||
@@ -228,11 +227,6 @@ static inline void sd_cpu_state_set(struct sd_cpu *cpu, enum sd_cpu_state state)
|
|||||||
cpu->state = state;
|
cpu->state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void sd_cpu_real_type_set(struct sd_cpu *cpu, const char *type)
|
|
||||||
{
|
|
||||||
strncpy(cpu->real_type, type, sizeof(cpu->real_type));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void sd_cpu_cpu_time_us_set(struct sd_cpu *cpu, u64 value)
|
static inline void sd_cpu_cpu_time_us_set(struct sd_cpu *cpu, u64 value)
|
||||||
{
|
{
|
||||||
cpu->d_cur->cpu_time_us = value;
|
cpu->d_cur->cpu_time_us = value;
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ struct sd_cpu *sd_cpu_new(struct sd_sys *parent, const char *id,
|
|||||||
|
|
||||||
cpu = ht_zalloc(sizeof(*cpu));
|
cpu = ht_zalloc(sizeof(*cpu));
|
||||||
cpu->i.parent = parent;
|
cpu->i.parent = parent;
|
||||||
strncpy(cpu->id, id, sizeof(cpu->id));
|
util_strlcpy(cpu->id, id, sizeof(cpu->id));
|
||||||
cpu->type = l_cpu_type_by_id(type);
|
cpu->type = l_cpu_type_by_id(type);
|
||||||
cpu->d_cur = &cpu->d1;
|
cpu->d_cur = &cpu->d1;
|
||||||
cpu->cnt = cnt;
|
cpu->cnt = cnt;
|
||||||
@@ -251,7 +251,7 @@ struct sd_sys *sd_sys_new(struct sd_sys *parent, const char *id)
|
|||||||
struct sd_sys *sys_new;
|
struct sd_sys *sys_new;
|
||||||
|
|
||||||
sys_new = ht_zalloc(sizeof(*sys_new));
|
sys_new = ht_zalloc(sizeof(*sys_new));
|
||||||
strncpy(sys_new->id, id, sizeof(sys_new->id));
|
util_strlcpy(sys_new->id, id, sizeof(sys_new->id));
|
||||||
util_list_init(&sys_new->child_list, struct sd_sys, list);
|
util_list_init(&sys_new->child_list, struct sd_sys, list);
|
||||||
util_list_init(&sys_new->cpu_list, struct sd_cpu, list);
|
util_list_init(&sys_new->cpu_list, struct sd_cpu, list);
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ static void l_mark_key_add(struct table *t, char *str)
|
|||||||
struct table_mark_key *key;
|
struct table_mark_key *key;
|
||||||
|
|
||||||
key = ht_zalloc(sizeof(*key));
|
key = ht_zalloc(sizeof(*key));
|
||||||
strncpy(key->str, str, sizeof(key->str));
|
util_strlcpy(key->str, str, sizeof(key->str));
|
||||||
util_list_add_tail(&t->mark_key_list, key);
|
util_list_add_tail(&t->mark_key_list, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,7 +617,7 @@ void table_row_select_key_get(struct table *t, char str[TABLE_STR_MAX])
|
|||||||
struct table_row *row;
|
struct table_row *row;
|
||||||
|
|
||||||
row = l_selected_row(t);
|
row = l_selected_row(t);
|
||||||
strncpy(str, row->entries[0].str, TABLE_STR_MAX);
|
util_strlcpy(str, row->entries[0].str, TABLE_STR_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ static void l_print_line(const char *line)
|
|||||||
char line_cpy[TBOX_MAX_STR + 1];
|
char line_cpy[TBOX_MAX_STR + 1];
|
||||||
char *ptr_old, *ptr;
|
char *ptr_old, *ptr;
|
||||||
|
|
||||||
strncpy(line_cpy, line, sizeof(line_cpy));
|
util_strlcpy(line_cpy, line, sizeof(line_cpy));
|
||||||
ptr_old = ptr = line_cpy;
|
ptr_old = ptr = line_cpy;
|
||||||
do {
|
do {
|
||||||
ptr = strchr(ptr, '\\');
|
ptr = strchr(ptr, '\\');
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ void win_sys_set(const char *sys_id)
|
|||||||
{
|
{
|
||||||
if (l_initialized)
|
if (l_initialized)
|
||||||
table_reset(l_t);
|
table_reset(l_t);
|
||||||
strncpy(l_sys_id, sys_id, sizeof(l_sys_id));
|
util_strlcpy(l_sys_id, sys_id, sizeof(l_sys_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -170,6 +170,10 @@ struct hd_geometry {
|
|||||||
#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER, 0)
|
#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER, 0)
|
||||||
/* Enable the volume (for Linux) */
|
/* Enable the volume (for Linux) */
|
||||||
#define BIODASDENABLE _IO(DASD_IOCTL_LETTER, 1)
|
#define BIODASDENABLE _IO(DASD_IOCTL_LETTER, 1)
|
||||||
|
/* Reserve the device for the current LPAR */
|
||||||
|
#define BIODASDRSRV _IO(DASD_IOCTL_LETTER, 2)
|
||||||
|
/* Release the device for the current LPAR */
|
||||||
|
#define BIODASDRLSE _IO(DASD_IOCTL_LETTER, 3)
|
||||||
/* Get information on a dasd device (enhanced) */
|
/* Get information on a dasd device (enhanced) */
|
||||||
#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER, 3, dasd_information2_t)
|
#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER, 3, dasd_information2_t)
|
||||||
/* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
|
/* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
|
||||||
@@ -203,5 +207,7 @@ int dasd_get_geo(const char *device, struct hd_geometry *geo);
|
|||||||
int dasd_get_info(const char *device, dasd_information2_t *info);
|
int dasd_get_info(const char *device, dasd_information2_t *info);
|
||||||
int dasd_is_ro(const char *device, bool *ro);
|
int dasd_is_ro(const char *device, bool *ro);
|
||||||
int dasd_reread_partition_table(const char *device, int ntries);
|
int dasd_reread_partition_table(const char *device, int ntries);
|
||||||
|
int dasd_disk_reserve(const char *device);
|
||||||
|
int dasd_disk_release(const char *device);
|
||||||
|
|
||||||
#endif /* LIB_DASD_BASE_H */
|
#endif /* LIB_DASD_BASE_H */
|
||||||
|
|||||||
@@ -112,6 +112,8 @@
|
|||||||
*/
|
*/
|
||||||
#define LIB_LIBZDS_H
|
#define LIB_LIBZDS_H
|
||||||
|
|
||||||
|
#include "lib/util_base.h"
|
||||||
|
#include "lib/util_list.h"
|
||||||
#include "vtoc.h"
|
#include "vtoc.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -328,11 +330,74 @@ struct pds_member_entry {
|
|||||||
*/
|
*/
|
||||||
struct zdsroot;
|
struct zdsroot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @struct raw_vtoc
|
||||||
|
* @brief The VTOC is a directory of data sets on one DASD
|
||||||
|
*
|
||||||
|
* As the VTOC is the data area on the DASD that describes all data sets,
|
||||||
|
* this library will often have to refer to the various records in the VTOC.
|
||||||
|
* To make this more efficient, we will read the whole VTOC once and identify
|
||||||
|
* all elements (DSCBs). The raw data of the VTOC tracks and the index to the
|
||||||
|
* DSCBs is stored.
|
||||||
|
*/
|
||||||
|
struct raw_vtoc {
|
||||||
|
/** @brief The raw track data */
|
||||||
|
char *rawdata;
|
||||||
|
/** @brief This size of the raw track data in bytes */
|
||||||
|
unsigned long long rawdatasize;
|
||||||
|
/** @brief An array with pointers to the various DSCBs in the rawdata */
|
||||||
|
char **vtocindex;
|
||||||
|
/** @brief Number of entries in the index */
|
||||||
|
unsigned int vtocindexcount;
|
||||||
|
/** @brief Number of records per VTOC track
|
||||||
|
*
|
||||||
|
* @note While the DS4DEVDT field in the format 4 DSCB names the number
|
||||||
|
* if DSCBs per VTOC track, we count the records, which is DS4DEVDT + 1
|
||||||
|
* for record 0.
|
||||||
|
*/
|
||||||
|
unsigned int vtoc_rec_per_track;
|
||||||
|
/** @brief The track number at which the vtoc begins on the DASD */
|
||||||
|
unsigned int vtoctrackoffset;
|
||||||
|
/** @brief Start record of VTOC.
|
||||||
|
*
|
||||||
|
* The rawdata contains full tracks. This is the number of the first
|
||||||
|
* record that actually belongs to the VTOC
|
||||||
|
*/
|
||||||
|
unsigned int vtocrecno;
|
||||||
|
/** @brief The DASD this vtoc was read from */
|
||||||
|
struct dasd *dasd;
|
||||||
|
/** @brief Detailed error messages in case of a problem */
|
||||||
|
struct errorlog *log;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct dasd
|
* @struct dasd
|
||||||
* @brief Represents one physical device, may have a vtoc
|
* @brief Represents one physical device, may have a vtoc
|
||||||
*/
|
*/
|
||||||
struct dasd;
|
struct dasd {
|
||||||
|
/** @brief List head used to store a list of DASDs in struct zdsroot */
|
||||||
|
struct util_list_node list;
|
||||||
|
/** @brief Name of the block device, e.g. /dev/dasde */
|
||||||
|
char *device;
|
||||||
|
/** @brief File descriptor for the block device.
|
||||||
|
*
|
||||||
|
* The device is kept open for as along as the library uses it.
|
||||||
|
* This lets the system know that the device is still in use.
|
||||||
|
*/
|
||||||
|
int inusefd;
|
||||||
|
/* @brief where to find the volume label */
|
||||||
|
unsigned int label_block;
|
||||||
|
/** @brief Device geometry. How many cylinders does the DASD have. */
|
||||||
|
unsigned int cylinders;
|
||||||
|
/** @brief Device geometry. How many heads does the DASD have. */
|
||||||
|
unsigned int heads;
|
||||||
|
/** @brief The VTOC data that has been read from this device */
|
||||||
|
struct raw_vtoc *rawvtoc;
|
||||||
|
/** @brief The volume label that has been read from this device */
|
||||||
|
volume_label_t *vlabel;
|
||||||
|
/** @brief Detailed error messages in case of a problem */
|
||||||
|
struct errorlog *log;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct dasditerator
|
* @struct dasditerator
|
||||||
@@ -350,12 +415,6 @@ struct dasditerator;
|
|||||||
*/
|
*/
|
||||||
struct dasdhandle;
|
struct dasdhandle;
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct raw_vtoc
|
|
||||||
* @brief The VTOC is a directory of data sets on one dasd
|
|
||||||
*/
|
|
||||||
struct raw_vtoc;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct dscbiterator
|
* @struct dscbiterator
|
||||||
* @brief allows to iterate over all DSCBs in a vtoc
|
* @brief allows to iterate over all DSCBs in a vtoc
|
||||||
@@ -572,7 +631,13 @@ int lzds_dasd_get_vlabel(struct dasd *dasd, struct volume_label **vlabel);
|
|||||||
* @brief Read the vtoc data from device. The data as stored as part
|
* @brief Read the vtoc data from device. The data as stored as part
|
||||||
* of the struct dasd.
|
* of the struct dasd.
|
||||||
*/
|
*/
|
||||||
int lzds_dasd_read_rawvtoc(struct dasd *dasd);
|
int lzds_dasd_read_rawvtoc(struct dasd *dasd, struct raw_vtoc *vtoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Read the vtoc data from device. The data as stored as part
|
||||||
|
* of the struct dasd.
|
||||||
|
*/
|
||||||
|
int lzds_dasd_alloc_rawvtoc(struct dasd *dasd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the previously read raw_vtoc data.
|
* @brief Get the previously read raw_vtoc data.
|
||||||
@@ -787,6 +852,8 @@ int lzds_zdsroot_extract_datasets_from_dasd(struct zdsroot *root,
|
|||||||
struct dasd *dasd);
|
struct dasd *dasd);
|
||||||
|
|
||||||
|
|
||||||
|
void lzds_dslist_free(struct zdsroot *root);
|
||||||
|
|
||||||
|
|
||||||
/** @} */ /* end of group libzds_functions_high */
|
/** @} */ /* end of group libzds_functions_high */
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ static inline void util_ptr_vec_free(void **ptr_vec, int count)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!ptr_vec || count < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
free(ptr_vec[i]);
|
free(ptr_vec[i]);
|
||||||
free(ptr_vec);
|
free(ptr_vec);
|
||||||
|
|||||||
@@ -14,6 +14,10 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocate memory or panic in case of failure
|
* Allocate memory or panic in case of failure
|
||||||
*
|
*
|
||||||
@@ -125,4 +129,11 @@ int __util_vsprintf(const char *func, const char *file, int line,
|
|||||||
char *util_strcat_realloc(char *str1, const char *str2);
|
char *util_strcat_realloc(char *str1, const char *str2);
|
||||||
void util_str_toupper(char *str);
|
void util_str_toupper(char *str);
|
||||||
|
|
||||||
|
char *util_strstrip(char *s);
|
||||||
|
size_t util_strlcpy(char *dest, const char *src, size_t size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /** LIB_UTIL_LIBC_H @} */
|
#endif /** LIB_UTIL_LIBC_H @} */
|
||||||
|
|||||||
@@ -68,5 +68,8 @@ const char *util_rec_get(struct util_rec *rec, const char *key);
|
|||||||
|
|
||||||
void util_rec_print_hdr(struct util_rec *rec);
|
void util_rec_print_hdr(struct util_rec *rec);
|
||||||
void util_rec_print(struct util_rec *rec);
|
void util_rec_print(struct util_rec *rec);
|
||||||
|
void util_rec_print_separator(struct util_rec *rec);
|
||||||
|
|
||||||
|
void util_rec_set_indent(struct util_rec *rec, int indent);
|
||||||
|
|
||||||
#endif /** LIB_UTIL_REC_H @} */
|
#endif /** LIB_UTIL_REC_H @} */
|
||||||
|
|||||||
52
include/lib/vmcp.h
Normal file
52
include/lib/vmcp.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* vmcp - z/VM CP command library
|
||||||
|
*
|
||||||
|
* Copyright IBM Corp. 2005, 2018
|
||||||
|
*
|
||||||
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LIB_VMCP_H
|
||||||
|
#define LIB_VMCP_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define VMCP_DEVICE_NODE "/dev/vmcp" /* VMCP device name */
|
||||||
|
#define VMCP_DEFAULT_BUFSZ 0x4000 /* VMCP default buffer size */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Error codes returned by vmcp() function. This enables the caller
|
||||||
|
* to emit a detailed error message on the type of failure.
|
||||||
|
*/
|
||||||
|
#define VMCP_SUCCESS 0 /* VMCP operation completed successfully */
|
||||||
|
#define VMCP_ERR_OPEN (-1) /* Error Open of VMCP device */
|
||||||
|
#define VMCP_ERR_SETBUF (-2) /* Error VMCP_SETBUF ioctl */
|
||||||
|
#define VMCP_ERR_READ (-3) /* Error VMCP read system call */
|
||||||
|
#define VMCP_ERR_GETCODE (-4) /* Error VMCP_GETCODE ioctl */
|
||||||
|
#define VMCP_ERR_GETSIZE (-5) /* Error VMCP_GETSIZE ioctl */
|
||||||
|
#define VMCP_ERR_TOOSMALL (-6) /* Error VMCP buffer too small for
|
||||||
|
* response
|
||||||
|
*/
|
||||||
|
#define VMCP_ERR_WRITE (-7) /* Error VMCP write system call */
|
||||||
|
|
||||||
|
struct vmcp_parm {
|
||||||
|
const char *cpcmd;
|
||||||
|
unsigned int buffer_size;
|
||||||
|
bool do_upper;
|
||||||
|
int cprc;
|
||||||
|
char *response;
|
||||||
|
unsigned int response_size;
|
||||||
|
};
|
||||||
|
|
||||||
|
int vmcp(struct vmcp_parm *cp);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -2,7 +2,9 @@ include ../common.mak
|
|||||||
|
|
||||||
all: xcec-bridge
|
all: xcec-bridge
|
||||||
|
|
||||||
xcec-bridge: xcec-bridge.o
|
libs = $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
|
xcec-bridge: xcec-bridge.o $(libs)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o core xcec-bridge
|
rm -f *.o core xcec-bridge
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
/* a signal causes the interfaces to be re-checked */
|
/* a signal causes the interfaces to be re-checked */
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
|
|
||||||
#define UPDATE_SIGNAL SIGUSR1
|
#define UPDATE_SIGNAL SIGUSR1
|
||||||
|
|
||||||
#define DEV_NAME_LEN IFNAMSIZ
|
#define DEV_NAME_SIZE IFNAMSIZ
|
||||||
|
|
||||||
#define BUFFER_LEN 65536
|
#define BUFFER_LEN 65536
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ struct int_sock {
|
|||||||
int features;
|
int features;
|
||||||
int i_fd;
|
int i_fd;
|
||||||
int o_fd;
|
int o_fd;
|
||||||
char dev_name[DEV_NAME_LEN];
|
char dev_name[DEV_NAME_SIZE];
|
||||||
int mtu_warning;
|
int mtu_warning;
|
||||||
|
|
||||||
struct int_sock *next;
|
struct int_sock *next;
|
||||||
@@ -91,7 +92,7 @@ int open_incoming_socket(char *dev_name)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(if_req.ifr_name,dev_name,DEV_NAME_LEN);
|
util_strlcpy(if_req.ifr_name, dev_name, DEV_NAME_SIZE);
|
||||||
retval=ioctl(fd,SIOCGIFINDEX,&if_req);
|
retval=ioctl(fd,SIOCGIFINDEX,&if_req);
|
||||||
if (retval==-1) {
|
if (retval==-1) {
|
||||||
syslog(LOG_ERR,"can't ioctl on raw packet socket, " \
|
syslog(LOG_ERR,"can't ioctl on raw packet socket, " \
|
||||||
@@ -192,7 +193,7 @@ int open_outgoing_socket(char *dev_name)
|
|||||||
int interface_in_list(struct int_sock *item,struct int_sock *list)
|
int interface_in_list(struct int_sock *item,struct int_sock *list)
|
||||||
{
|
{
|
||||||
for (;list;list=list->next) {
|
for (;list;list=list->next) {
|
||||||
if (!strncmp(item->dev_name,list->dev_name,DEV_NAME_LEN)) {
|
if (!strncmp(item->dev_name,list->dev_name,DEV_NAME_SIZE)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,7 +282,7 @@ int read_sys(struct int_sock **nlist)
|
|||||||
do_broadcast_bridging=0;
|
do_broadcast_bridging=0;
|
||||||
|
|
||||||
is->mtu_warning=0;
|
is->mtu_warning=0;
|
||||||
strncpy(is->dev_name, if_name, DEV_NAME_LEN);
|
util_strlcpy(is->dev_name, if_name, DEV_NAME_SIZE);
|
||||||
if (!strncmp(if_name,"hsi",3)) {
|
if (!strncmp(if_name,"hsi",3)) {
|
||||||
is->features=I_S_FEATURE_PASSTHROUGH;
|
is->features=I_S_FEATURE_PASSTHROUGH;
|
||||||
}
|
}
|
||||||
@@ -317,7 +318,7 @@ void update_interfaces()
|
|||||||
prev=NULL;
|
prev=NULL;
|
||||||
while (j) {
|
while (j) {
|
||||||
if (!strncmp(j->dev_name,i->dev_name,
|
if (!strncmp(j->dev_name,i->dev_name,
|
||||||
DEV_NAME_LEN)) {
|
DEV_NAME_SIZE)) {
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
select_set.i_s_list=j->next;
|
select_set.i_s_list=j->next;
|
||||||
} else {
|
} else {
|
||||||
@@ -360,7 +361,7 @@ void update_interfaces()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(new_int->dev_name,i->dev_name,DEV_NAME_LEN);
|
util_strlcpy(new_int->dev_name, i->dev_name, DEV_NAME_SIZE);
|
||||||
new_int->i_fd=i_fd;
|
new_int->i_fd=i_fd;
|
||||||
new_int->o_fd=o_fd;
|
new_int->o_fd=o_fd;
|
||||||
new_int->features=i->features;
|
new_int->features=i->features;
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
include ../common.mak
|
include ../common.mak
|
||||||
|
|
||||||
|
libs = $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
all: chreipl lsreipl chshut lsshut
|
all: chreipl lsreipl chshut lsshut
|
||||||
|
|
||||||
|
libs = $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
objects = main.o ccw.o fcp.o system.o shutdown.o \
|
objects = main.o ccw.o fcp.o system.o shutdown.o \
|
||||||
cmd_lsshut.o cmd_chshut.o cmd_lsreipl.o cmd_chreipl.o proc.o
|
cmd_lsshut.o cmd_chshut.o cmd_lsreipl.o cmd_chreipl.o proc.o
|
||||||
|
|
||||||
chreipl: $(objects)
|
chreipl: $(objects) $(libs)
|
||||||
$(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
lsreipl:
|
lsreipl:
|
||||||
ln -sf chreipl lsreipl
|
ln -sf chreipl lsreipl
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/sysmacros.h>
|
#include <sys/sysmacros.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
#include "ipl_tools.h"
|
#include "ipl_tools.h"
|
||||||
@@ -182,7 +183,7 @@ static void set_bootprog(const char *bootprog)
|
|||||||
ERR_EXIT("Bootprog \"%s\" is not a decimal number", bootprog);
|
ERR_EXIT("Bootprog \"%s\" is not a decimal number", bootprog);
|
||||||
if (bootprog_int > UINT_MAX)
|
if (bootprog_int > UINT_MAX)
|
||||||
ERR_EXIT("Invalid bootprog specified");
|
ERR_EXIT("Invalid bootprog specified");
|
||||||
strncpy(l.bootprog, bootprog, sizeof(l.bootprog));
|
util_strlcpy(l.bootprog, bootprog, sizeof(l.bootprog));
|
||||||
l.bootprog_set = 1;
|
l.bootprog_set = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +295,7 @@ static int set_reipl_type(const char *dev_name)
|
|||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
strncpy(l.dev, dev_name, sizeof(l.dev));
|
util_strlcpy(l.dev, dev_name, sizeof(l.dev));
|
||||||
dev_from_part(l.dev);
|
dev_from_part(l.dev);
|
||||||
l.dev_set = 1;
|
l.dev_set = 1;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -302,19 +303,21 @@ static int set_reipl_type(const char *dev_name)
|
|||||||
|
|
||||||
static int get_chreipl_helper_cmd(dev_t dev, char cmd[PATH_MAX])
|
static int get_chreipl_helper_cmd(dev_t dev, char cmd[PATH_MAX])
|
||||||
{
|
{
|
||||||
char chreipl_helper[PATH_MAX];
|
char *chreipl_helper;
|
||||||
struct proc_dev_entry pde;
|
struct proc_dev_entry pde;
|
||||||
|
|
||||||
if (proc_dev_get_entry(dev, 1, &pde) != 0)
|
if (proc_dev_get_entry(dev, 1, &pde) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
snprintf(chreipl_helper, PATH_MAX,
|
util_asprintf(&chreipl_helper,
|
||||||
"%s/%s.%s", TOOLS_LIBDIR, "chreipl_helper", pde.name);
|
"%s/%s.%s", TOOLS_LIBDIR, "chreipl_helper", pde.name);
|
||||||
if (access(chreipl_helper, X_OK) != 0) {
|
if (access(chreipl_helper, X_OK) != 0) {
|
||||||
proc_dev_free_entry(&pde);
|
proc_dev_free_entry(&pde);
|
||||||
|
free(chreipl_helper);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sprintf(cmd, "%s %d:%d", chreipl_helper, major(dev), minor(dev));
|
sprintf(cmd, "%s %d:%d", chreipl_helper, major(dev), minor(dev));
|
||||||
proc_dev_free_entry(&pde);
|
proc_dev_free_entry(&pde);
|
||||||
|
free(chreipl_helper);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +448,7 @@ static void set_target_type_auto(const char *arg)
|
|||||||
{
|
{
|
||||||
char busid[10];
|
char busid[10];
|
||||||
|
|
||||||
if (access(arg, R_OK) == 0) {
|
if (access(arg, F_OK) == 0) {
|
||||||
set_target_type(TT_NODE, 1);
|
set_target_type(TT_NODE, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -539,12 +542,19 @@ static void parse_chreipl_options(int argc, char *argv[])
|
|||||||
parse_pos_args(&argv[optind], argc - optind);
|
parse_pos_args(&argv[optind], argc - optind);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void verify_write_access(const char *path, const char *attr)
|
static void check_exists(const char *path, const char *attr)
|
||||||
{
|
{
|
||||||
char fpath[PATH_MAX];
|
char fpath[PATH_MAX];
|
||||||
|
|
||||||
snprintf(fpath, sizeof(fpath), "/sys/firmware/%s", path);
|
snprintf(fpath, sizeof(fpath), "/sys/firmware/%s", path);
|
||||||
if (access(fpath, W_OK) != 0)
|
if (access(fpath, F_OK) != 0)
|
||||||
|
ERR_EXIT("System does not allow to set %s", attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void write_str_optional(char *string, char *file, int exit_on_fail,
|
||||||
|
const char *attr)
|
||||||
|
{
|
||||||
|
if (write_str_errno(string, file) && exit_on_fail)
|
||||||
ERR_EXIT("System does not allow to set %s", attr);
|
ERR_EXIT("System does not allow to set %s", attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,22 +595,18 @@ static void chreipl_ccw(void)
|
|||||||
ERR_EXIT("Could not find DASD CCW device \"%s\"", l.busid);
|
ERR_EXIT("Could not find DASD CCW device \"%s\"", l.busid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (l.bootparms_set && strlen(l.bootparms) > BOOTPARMS_CCW_MAX) {
|
||||||
|
ERR_EXIT("Maximum boot parameter length exceeded (%zu/%u)",
|
||||||
|
strlen(l.bootparms), BOOTPARMS_CCW_MAX);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On old systems that use CCW reipl loadparm cannot be set
|
* On old systems that use CCW reipl loadparm cannot be set
|
||||||
*/
|
*/
|
||||||
if (l.loadparm_set)
|
write_str_optional(l.loadparm, "reipl/ccw/loadparm", l.loadparm_set,
|
||||||
verify_write_access("reipl/ccw/loadparm", "loadparm");
|
"loadparm");
|
||||||
if (l.bootparms_set) {
|
write_str_optional(l.bootparms, "reipl/ccw/parm", l.bootparms_set,
|
||||||
verify_write_access("reipl/ccw/parm", "boot parameters");
|
"boot parameters");
|
||||||
if (strlen(l.bootparms) > BOOTPARMS_CCW_MAX)
|
|
||||||
ERR_EXIT("Maximum boot parameter length exceeded "
|
|
||||||
"(%zu/%u)", strlen(l.bootparms),
|
|
||||||
BOOTPARMS_CCW_MAX);
|
|
||||||
}
|
|
||||||
if (access("/sys/firmware/reipl/ccw/parm", W_OK) == 0)
|
|
||||||
write_str(l.bootparms, "reipl/ccw/parm");
|
|
||||||
if (access("/sys/firmware/reipl/ccw/loadparm", W_OK) == 0)
|
|
||||||
write_str(l.loadparm, "reipl/ccw/loadparm");
|
|
||||||
write_str(l.busid, "reipl/ccw/device");
|
write_str(l.busid, "reipl/ccw/device");
|
||||||
write_str("ccw", "reipl/reipl_type");
|
write_str("ccw", "reipl/reipl_type");
|
||||||
|
|
||||||
@@ -616,27 +622,21 @@ static void chreipl_fcp(void)
|
|||||||
ERR_EXIT("Device is on cio_ignore list, try \"cio_ignore -r %s\"?", l.busid);
|
ERR_EXIT("Device is on cio_ignore list, try \"cio_ignore -r %s\"?", l.busid);
|
||||||
ERR_EXIT("Could not find FCP device \"%s\"", l.busid);
|
ERR_EXIT("Could not find FCP device \"%s\"", l.busid);
|
||||||
}
|
}
|
||||||
verify_write_access("reipl/fcp/device", "\"fcp\" re-IPL target");
|
check_exists("reipl/fcp/device", "\"fcp\" re-IPL target");
|
||||||
|
if (l.bootparms_set && strlen(l.bootparms) > BOOTPARMS_FCP_MAX) {
|
||||||
|
ERR_EXIT("Maximum boot parameter length exceeded (%zu/%u)",
|
||||||
|
strlen(l.bootparms), BOOTPARMS_FCP_MAX);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* On old systems the FCP reipl loadparm cannot be set
|
* On old systems the FCP reipl loadparm cannot be set
|
||||||
*/
|
*/
|
||||||
if (l.loadparm_set)
|
write_str_optional(l.loadparm, "reipl/fcp/loadparm", l.loadparm_set,
|
||||||
verify_write_access("reipl/fcp/loadparm", "loadparm");
|
"loadparm");
|
||||||
if (l.bootparms_set) {
|
write_str_optional(l.bootparms, "reipl/fcp/scp_data", l.bootparms_set,
|
||||||
verify_write_access("reipl/fcp/scp_data", "boot parameters");
|
"boot parameters");
|
||||||
if (strlen(l.bootparms) > BOOTPARMS_FCP_MAX)
|
|
||||||
ERR_EXIT("Maximum boot parameter length exceeded "
|
|
||||||
"(%zu/%u)", strlen(l.bootparms),
|
|
||||||
BOOTPARMS_FCP_MAX);
|
|
||||||
}
|
|
||||||
if (access("/sys/firmware/reipl/fcp/scp_data", W_OK) == 0)
|
|
||||||
write_str(l.bootparms, "reipl/fcp/scp_data");
|
|
||||||
if (access("/sys/firmware/reipl/fcp/loadparm", W_OK) == 0)
|
|
||||||
write_str(l.loadparm, "reipl/fcp/loadparm");
|
|
||||||
write_str(l.busid, "reipl/fcp/device");
|
write_str(l.busid, "reipl/fcp/device");
|
||||||
write_str(l.wwpn, "reipl/fcp/wwpn");
|
write_str(l.wwpn, "reipl/fcp/wwpn");
|
||||||
write_str(l.lun, "reipl/fcp/lun");
|
write_str(l.lun, "reipl/fcp/lun");
|
||||||
write_str("fcp", "reipl/reipl_type");
|
|
||||||
/*
|
/*
|
||||||
* set the boot record logical block address. Master boot
|
* set the boot record logical block address. Master boot
|
||||||
* record. It is always 0 for Linux
|
* record. It is always 0 for Linux
|
||||||
@@ -645,6 +645,7 @@ static void chreipl_fcp(void)
|
|||||||
if (!l.bootprog_set)
|
if (!l.bootprog_set)
|
||||||
sprintf(l.bootprog, "0");
|
sprintf(l.bootprog, "0");
|
||||||
write_str(l.bootprog, "reipl/fcp/bootprog");
|
write_str(l.bootprog, "reipl/fcp/bootprog");
|
||||||
|
write_str("fcp", "reipl/reipl_type");
|
||||||
|
|
||||||
print_fcp(0, 0);
|
print_fcp(0, 0);
|
||||||
}
|
}
|
||||||
@@ -652,17 +653,14 @@ static void chreipl_fcp(void)
|
|||||||
static void chreipl_nss(void)
|
static void chreipl_nss(void)
|
||||||
{
|
{
|
||||||
check_nss_opts();
|
check_nss_opts();
|
||||||
verify_write_access("reipl/nss/name", "\"nss\" re-IPL target");
|
check_exists("reipl/nss/name", "\"nss\" re-IPL target");
|
||||||
if (l.bootparms_set) {
|
if (l.bootparms_set && strlen(l.bootparms) > BOOTPARMS_NSS_MAX) {
|
||||||
verify_write_access("reipl/nss/parm", "boot parameters");
|
ERR_EXIT("Maximum boot parameter length exceeded (%zu/%u)",
|
||||||
if (strlen(l.bootparms) > BOOTPARMS_NSS_MAX)
|
strlen(l.bootparms), BOOTPARMS_NSS_MAX);
|
||||||
ERR_EXIT("Maximum boot parameter length exceeded "
|
|
||||||
"(%zu/%u)", strlen(l.bootparms),
|
|
||||||
BOOTPARMS_NSS_MAX);
|
|
||||||
}
|
}
|
||||||
|
write_str_optional(l.bootparms, "reipl/nss/parm", l.bootparms_set,
|
||||||
|
"boot parameters");
|
||||||
write_str(l.nss_name, "reipl/nss/name");
|
write_str(l.nss_name, "reipl/nss/name");
|
||||||
if (access("/sys/firmware/reipl/nss/parm", W_OK) == 0)
|
|
||||||
write_str(l.bootparms, "reipl/nss/parm");
|
|
||||||
write_str("nss", "reipl/reipl_type");
|
write_str("nss", "reipl/reipl_type");
|
||||||
print_nss(0);
|
print_nss(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "ipl_tools.h"
|
#include "ipl_tools.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -30,7 +31,7 @@ int fcp_is_device(const char *devno)
|
|||||||
*/
|
*/
|
||||||
void fcp_wwpn_get(const char *device, char *wwpn)
|
void fcp_wwpn_get(const char *device, char *wwpn)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX], buf[4096];
|
char path[PATH_MAX], buf[20];
|
||||||
FILE *fh;
|
FILE *fh;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ void fcp_wwpn_get(const char *device, char *wwpn)
|
|||||||
rc = fscanf(fh, "%s", buf);
|
rc = fscanf(fh, "%s", buf);
|
||||||
if (rc <= 0)
|
if (rc <= 0)
|
||||||
ERR_EXIT("Could not lookup WWPN \"%s\"", path);
|
ERR_EXIT("Could not lookup WWPN \"%s\"", path);
|
||||||
strncpy(wwpn, buf, 20);
|
util_strlcpy(wwpn, buf, 20);
|
||||||
fclose(fh);
|
fclose(fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ void fcp_wwpn_get(const char *device, char *wwpn)
|
|||||||
*/
|
*/
|
||||||
void fcp_lun_get(const char *device, char *lun)
|
void fcp_lun_get(const char *device, char *lun)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX], buf[4096];
|
char path[PATH_MAX], buf[20];
|
||||||
FILE *fh;
|
FILE *fh;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ void fcp_lun_get(const char *device, char *lun)
|
|||||||
rc = fscanf(fh, "%s", buf);
|
rc = fscanf(fh, "%s", buf);
|
||||||
if (rc <= 0)
|
if (rc <= 0)
|
||||||
ERR_EXIT("Could not lookup LUN \"%s\"", path);
|
ERR_EXIT("Could not lookup LUN \"%s\"", path);
|
||||||
strncpy(lun, buf, 20);
|
util_strlcpy(lun, buf, 20);
|
||||||
fclose(fh);
|
fclose(fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
|
|
||||||
#include "ipl_tools.h"
|
#include "ipl_tools.h"
|
||||||
|
|
||||||
struct globals g;
|
struct globals g;
|
||||||
@@ -31,7 +33,7 @@ void __noreturn print_version_exit(void)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
strncpy(g.prog_name, argv[0], sizeof(g.prog_name));
|
util_strlcpy(g.prog_name, argv[0], sizeof(g.prog_name));
|
||||||
if (strstr(argv[0], "chreipl") != NULL) {
|
if (strstr(argv[0], "chreipl") != NULL) {
|
||||||
cmd_chreipl(argc, argv);
|
cmd_chreipl(argc, argv);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* it under the terms of the MIT license. See LICENSE for details.
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "ipl_tools.h"
|
#include "ipl_tools.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -81,10 +82,11 @@ void read_str(char *string, const char *path, size_t len)
|
|||||||
*/
|
*/
|
||||||
void read_fw_str(char *string, const char *file, size_t len)
|
void read_fw_str(char *string, const char *file, size_t len)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX];
|
char *path;
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "/sys/firmware/%s", file);
|
util_asprintf(&path, "/sys/firmware/%s", file);
|
||||||
return read_str(string, path, len);
|
read_str(string, path, len);
|
||||||
|
free(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -129,7 +131,7 @@ int write_str_errno(char *string, char *file)
|
|||||||
snprintf(path, sizeof(path), "/sys/firmware/%s", file);
|
snprintf(path, sizeof(path), "/sys/firmware/%s", file);
|
||||||
fh = open(path, O_WRONLY);
|
fh = open(path, O_WRONLY);
|
||||||
if (fh < 0)
|
if (fh < 0)
|
||||||
ERR_EXIT_ERRNO("Could not open \"%s\"", file);
|
return errno;
|
||||||
if (write(fh, value, strlen(value)) < 0)
|
if (write(fh, value, strlen(value)) < 0)
|
||||||
return errno;
|
return errno;
|
||||||
close(fh);
|
close(fh);
|
||||||
|
|||||||
@@ -75,9 +75,11 @@ static const struct tool_info iucv_tool[2] = {
|
|||||||
static void __noreturn usage_exit(const struct tool_info *prg, int is_error,
|
static void __noreturn usage_exit(const struct tool_info *prg, int is_error,
|
||||||
const char *msg)
|
const char *msg)
|
||||||
{
|
{
|
||||||
|
FILE *file = is_error ? stderr : stdout;
|
||||||
|
|
||||||
if (msg != NULL)
|
if (msg != NULL)
|
||||||
fprintf(stderr, _("%s: %s\n"), prg->name, msg);
|
fprintf(file, _("%s: %s\n"), prg->name, msg);
|
||||||
fprintf(stderr, _(prg->usage), prg->name, prg->name);
|
fprintf(file, _(prg->usage), prg->name, prg->name);
|
||||||
exit(is_error ? 1 : 0); /* rc=1 .. invalid args */
|
exit(is_error ? 1 : 0); /* rc=1 .. invalid args */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ all: $(lib)
|
|||||||
|
|
||||||
objects = dasd_sys.o dasd_ioctl.o
|
objects = dasd_sys.o dasd_ioctl.o
|
||||||
|
|
||||||
$(lib): $(objects) Makefile
|
$(lib): $(objects)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
|
|||||||
@@ -261,3 +261,42 @@ int dasd_reread_partition_table(const char *device, int ntries)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reserve DASD disk.
|
||||||
|
*
|
||||||
|
* @param[in] device node device node's name
|
||||||
|
*
|
||||||
|
* @retval 0 in case of success
|
||||||
|
* @retval errno in case of failure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int dasd_disk_reserve(const char *device)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
fd = dasd_open_device(device, O_RDONLY);
|
||||||
|
RUN_IOCTL(fd, BIODASDRSRV, NULL);
|
||||||
|
dasd_close_device(fd);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Release DASD disk
|
||||||
|
*
|
||||||
|
* @param[in] device node device node's name
|
||||||
|
*
|
||||||
|
* @retval 0 in case of success
|
||||||
|
* @retval errno in case of failure
|
||||||
|
*/
|
||||||
|
int dasd_disk_release(const char *device)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
fd = dasd_open_device(device, O_RDONLY);
|
||||||
|
RUN_IOCTL(fd, BIODASDRLSE, NULL);
|
||||||
|
dasd_close_device(fd);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ lib = libu2s.a
|
|||||||
|
|
||||||
all: $(lib)
|
all: $(lib)
|
||||||
|
|
||||||
objects = u2s.o misc.o
|
objects = u2s.o
|
||||||
|
|
||||||
$(lib): $(objects)
|
$(lib): $(objects)
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Misc - Local helper functions
|
|
||||||
*
|
|
||||||
* Copyright IBM Corp. 2016, 2017
|
|
||||||
*
|
|
||||||
* s390-tools is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the MIT license. See LICENSE for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include "lib/util_base.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Helper function that copies a string safely
|
|
||||||
*/
|
|
||||||
size_t misc_strlcpy(char *dest, const char *src, size_t size)
|
|
||||||
{
|
|
||||||
size_t str_len = strlen(src);
|
|
||||||
size_t len;
|
|
||||||
|
|
||||||
if (size) {
|
|
||||||
len = MIN(size - 1, str_len);
|
|
||||||
memcpy(dest, src, len);
|
|
||||||
dest[len] = '\0';
|
|
||||||
}
|
|
||||||
return str_len;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Misc - Local helper functions
|
|
||||||
*
|
|
||||||
* Copyright IBM Corp. 2016, 2017
|
|
||||||
*
|
|
||||||
* s390-tools is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the MIT license. See LICENSE for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MISC_H
|
|
||||||
#define MISC_H
|
|
||||||
|
|
||||||
size_t misc_strlcpy(char *, const char *, size_t);
|
|
||||||
|
|
||||||
#endif /* MISC_H */
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <wait.h>
|
#include <wait.h>
|
||||||
|
|
||||||
#include "lib/u2s.h"
|
#include "lib/u2s.h"
|
||||||
#include "misc.h"
|
#include "lib/util_libc.h"
|
||||||
|
|
||||||
#define DEV_BUFFER_LENGTH 20
|
#define DEV_BUFFER_LENGTH 20
|
||||||
#define PATH_BUFFER_LENGTH 256
|
#define PATH_BUFFER_LENGTH 256
|
||||||
@@ -113,7 +113,7 @@ static int extract_busid(char *name, char *busid) {
|
|||||||
if (!start)
|
if (!start)
|
||||||
return -1;
|
return -1;
|
||||||
start++;
|
start++;
|
||||||
len = misc_strlcpy(busid, start, BUSIDSIZE);
|
len = util_strlcpy(busid, start, BUSIDSIZE);
|
||||||
if (len >= BUSIDSIZE)
|
if (len >= BUSIDSIZE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ static int find_busid_in_proc(int maja, int mina, char *busid)
|
|||||||
while (fscanf(filp, "%[^(] %*[^)] ) at ( %d : %d %*[^\n]\n",
|
while (fscanf(filp, "%[^(] %*[^)] ) at ( %d : %d %*[^\n]\n",
|
||||||
bus, &majb, &minb) != EOF) {
|
bus, &majb, &minb) != EOF) {
|
||||||
if ((maja == majb) && (mina == minb)) {
|
if ((maja == majb) && (mina == minb)) {
|
||||||
len = misc_strlcpy(busid, bus, BUSIDSIZE);
|
len = util_strlcpy(busid, bus, BUSIDSIZE);
|
||||||
if (len < BUSIDSIZE)
|
if (len < BUSIDSIZE)
|
||||||
rc = 0;
|
rc = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ examples = util_base_example \
|
|||||||
util_prg_example \
|
util_prg_example \
|
||||||
util_rec_example
|
util_rec_example
|
||||||
|
|
||||||
all: $(lib) $(examples)
|
all: $(lib)
|
||||||
|
examples: $(lib) $(examples)
|
||||||
|
|
||||||
objects = util_base.o \
|
objects = util_base.o \
|
||||||
util_path.o \
|
util_path.o \
|
||||||
|
|||||||
@@ -198,3 +198,60 @@ int __util_vsprintf(const char *func, const char *file, int line,
|
|||||||
rc != -1, "Could not format string\n");
|
rc != -1, "Could not format string\n");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strip leading and trailing spaces from string
|
||||||
|
*
|
||||||
|
* Remove string \a s leading and trailing spaces
|
||||||
|
*
|
||||||
|
* @param[in,out] s String to manipulate
|
||||||
|
*
|
||||||
|
* @returns Pointer to first non-space character in string \a s
|
||||||
|
*/
|
||||||
|
char *util_strstrip(char *s)
|
||||||
|
{
|
||||||
|
size_t size;
|
||||||
|
char *end;
|
||||||
|
|
||||||
|
size = strlen(s);
|
||||||
|
|
||||||
|
if (!size)
|
||||||
|
return s;
|
||||||
|
|
||||||
|
end = s + size - 1;
|
||||||
|
while (end >= s && isspace(*end))
|
||||||
|
end--;
|
||||||
|
*(end + 1) = '\0';
|
||||||
|
|
||||||
|
while (*s && isspace(*s))
|
||||||
|
s++;
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy \a src to buffer \a dest of size \a size. At most size - 1
|
||||||
|
* chars will be copied. \a dest will always be NUL terminated.
|
||||||
|
*
|
||||||
|
* Note: If the return value is greater than or equal to size truncation
|
||||||
|
* occurred.
|
||||||
|
*
|
||||||
|
* @param[in] dest Destination buffer
|
||||||
|
* @param[in] src Source string
|
||||||
|
* @param[in] size Size of destination buffer
|
||||||
|
*
|
||||||
|
* @returns strlen Length of \a src string
|
||||||
|
*/
|
||||||
|
size_t util_strlcpy(char *dest, const char *src, size_t size)
|
||||||
|
{
|
||||||
|
size_t str_len = strlen(src);
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
if (size) {
|
||||||
|
len = MIN(size - 1, str_len);
|
||||||
|
memcpy(dest, src, len);
|
||||||
|
dest[len] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_len;
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,10 +10,13 @@
|
|||||||
//! [code]
|
//! [code]
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "lib/util_libc.h"
|
#include "lib/util_libc.h"
|
||||||
#include "lib/util_panic.h"
|
#include "lib/util_panic.h"
|
||||||
|
|
||||||
|
#define EXAMPLE_WORD " /sys/devices/system/cpu "
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Demonstrate that out of memory is automatically handled via panic()
|
* Demonstrate that out of memory is automatically handled via panic()
|
||||||
*/
|
*/
|
||||||
@@ -22,6 +25,12 @@ int main(void)
|
|||||||
unsigned long ulong_max = (unsigned long)-1;
|
unsigned long ulong_max = (unsigned long)-1;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
char *zeroes, *str;
|
char *zeroes, *str;
|
||||||
|
char buffer[sizeof(EXAMPLE_WORD)];
|
||||||
|
|
||||||
|
strcat(buffer, EXAMPLE_WORD);
|
||||||
|
fprintf(stderr, "Try to remove leading and trailing spaces from "
|
||||||
|
"\"%s\"\nresult = \"%s\"\n", EXAMPLE_WORD,
|
||||||
|
util_strstrip(buffer));
|
||||||
|
|
||||||
/* Use util_strcat_realloc() for string concatenation */
|
/* Use util_strcat_realloc() for string concatenation */
|
||||||
fprintf(stderr, "Try to concatenate \"Hello\", \", \" and \"world!\": ");
|
fprintf(stderr, "Try to concatenate \"Hello\", \", \" and \"world!\": ");
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ static void test_util_path_is_xxx(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Usage: util_path_example [sysfs mount point] | "is_xxx"
|
* Usage: util_path_example sysfs [MOUNT_POINT] | is_xxx
|
||||||
*/
|
*/
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -111,6 +111,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
out_fail:
|
out_fail:
|
||||||
errx(EXIT_FAILURE, "Usage: %s sysfs <path> | is_xxx", argv[0]);
|
errx(EXIT_FAILURE, "Usage: %s sysfs [MOUNT_POINT] | is_xxx", argv[0]);
|
||||||
}
|
}
|
||||||
//! [code]
|
//! [code]
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ const struct util_prg prg = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct option opt_list[] = {
|
||||||
|
{ "help", no_argument, NULL, 'h' },
|
||||||
|
{ "version", no_argument, NULL, 'v' },
|
||||||
|
{ NULL, no_argument, NULL, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Demonstrate the util_prg_print() functions
|
* Demonstrate the util_prg_print() functions
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +55,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
util_prg_init(&prg);
|
util_prg_init(&prg);
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "vhe")) != -1) {
|
while ((opt = getopt_long(argc, argv, "vhe", opt_list, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'v':
|
case 'v':
|
||||||
util_prg_print_version();
|
util_prg_print_version();
|
||||||
|
|||||||
@@ -442,9 +442,9 @@ util_proc_dev_get_entry(dev_t device, int blockdev,
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provide one record form a /proc/mounts like file
|
* Provide one record from a /proc/mounts like file
|
||||||
*
|
*
|
||||||
* The parameter file_name distinguishes the file form procfs which
|
* The parameter file_name distinguishes the file from procfs which
|
||||||
* is read, the parameter spec is the selector for the record.
|
* is read, the parameter spec is the selector for the record.
|
||||||
*/
|
*/
|
||||||
int util_proc_mnt_get_entry(const char *file_name, const char *spec,
|
int util_proc_mnt_get_entry(const char *file_name, const char *spec,
|
||||||
@@ -456,7 +456,6 @@ int util_proc_mnt_get_entry(const char *file_name, const char *spec,
|
|||||||
rc = get_file_buffer(&file, file_name);
|
rc = get_file_buffer(&file, file_name);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
rc = -1;
|
|
||||||
while (!eof(&file)) {
|
while (!eof(&file)) {
|
||||||
rc = scan_mnt_entry(&file, entry);
|
rc = scan_mnt_entry(&file, entry);
|
||||||
if (rc)
|
if (rc)
|
||||||
@@ -467,6 +466,7 @@ int util_proc_mnt_get_entry(const char *file_name, const char *spec,
|
|||||||
}
|
}
|
||||||
util_proc_mnt_free_entry(entry);
|
util_proc_mnt_free_entry(entry);
|
||||||
}
|
}
|
||||||
|
rc = -1;
|
||||||
out_free:
|
out_free:
|
||||||
free_file_buffer(&file);
|
free_file_buffer(&file);
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ struct rec_fmt {
|
|||||||
int argz_sep;
|
int argz_sep;
|
||||||
} csv_p;
|
} csv_p;
|
||||||
} d;
|
} d;
|
||||||
|
int indent;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -122,9 +123,50 @@ struct util_rec *util_rec_new_wide(const char *hdr_sep)
|
|||||||
rec->fmt.type = REC_FMT_WIDE;
|
rec->fmt.type = REC_FMT_WIDE;
|
||||||
rec->fmt.d.wide_p.hdr_sep = util_strdup(hdr_sep);
|
rec->fmt.d.wide_p.hdr_sep = util_strdup(hdr_sep);
|
||||||
rec->fmt.d.wide_p.argz_sep = ',';
|
rec->fmt.d.wide_p.argz_sep = ',';
|
||||||
|
rec->fmt.indent = 0;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Print the indentation characters
|
||||||
|
*/
|
||||||
|
static inline void rec_print_indention(int indent)
|
||||||
|
{
|
||||||
|
if (indent <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
printf("%*s", indent, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Print record separator in "wide" output format
|
||||||
|
*/
|
||||||
|
static void rec_print_wide_separator(struct util_rec *rec)
|
||||||
|
{
|
||||||
|
const char *hdr_sep = rec->fmt.d.wide_p.hdr_sep;
|
||||||
|
int size = 0, field_count = 0;
|
||||||
|
struct util_rec_fld *fld;
|
||||||
|
char *buf;
|
||||||
|
|
||||||
|
if (!hdr_sep)
|
||||||
|
return;
|
||||||
|
|
||||||
|
util_list_iterate(rec->list, fld) {
|
||||||
|
if (fld->hdr) {
|
||||||
|
size += fld->width;
|
||||||
|
field_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size += field_count - 1;
|
||||||
|
buf = util_malloc(size + 1);
|
||||||
|
memset(buf, (int)hdr_sep[0], size);
|
||||||
|
buf[size] = 0;
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
|
printf("%s\n", buf);
|
||||||
|
free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print record header in "wide" output format
|
* Print record header in "wide" output format
|
||||||
*/
|
*/
|
||||||
@@ -135,6 +177,7 @@ static void rec_print_wide_hdr(struct util_rec *rec)
|
|||||||
struct util_rec_fld *fld;
|
struct util_rec_fld *fld;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
util_list_iterate(rec->list, fld) {
|
util_list_iterate(rec->list, fld) {
|
||||||
if (col_nr)
|
if (col_nr)
|
||||||
printf(" ");
|
printf(" ");
|
||||||
@@ -156,6 +199,7 @@ static void rec_print_wide_hdr(struct util_rec *rec)
|
|||||||
buf = util_malloc(size + 1);
|
buf = util_malloc(size + 1);
|
||||||
memset(buf, (int)hdr_sep[0], size);
|
memset(buf, (int)hdr_sep[0], size);
|
||||||
buf[size] = 0;
|
buf[size] = 0;
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
printf("%s\n", buf);
|
printf("%s\n", buf);
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
@@ -172,6 +216,7 @@ void rec_print_wide(struct util_rec *rec)
|
|||||||
int fld_count = 0;
|
int fld_count = 0;
|
||||||
char *entry;
|
char *entry;
|
||||||
|
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
util_list_iterate(rec->list, fld) {
|
util_list_iterate(rec->list, fld) {
|
||||||
if (!fld->hdr)
|
if (!fld->hdr)
|
||||||
continue;
|
continue;
|
||||||
@@ -225,6 +270,7 @@ struct util_rec *util_rec_new_long(const char *hdr_sep, const char *col_sep,
|
|||||||
rec->fmt.d.long_p.key_size = key_size;
|
rec->fmt.d.long_p.key_size = key_size;
|
||||||
rec->fmt.d.long_p.val_size = val_size;
|
rec->fmt.d.long_p.val_size = val_size;
|
||||||
rec->fmt.d.long_p.argz_sep = ' ';
|
rec->fmt.d.long_p.argz_sep = ' ';
|
||||||
|
rec->fmt.indent = 0;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,6 +287,7 @@ static void rec_print_long_hdr(struct util_rec *rec)
|
|||||||
fld = rec_get_fld(rec, p->key);
|
fld = rec_get_fld(rec, p->key);
|
||||||
util_assert(fld != NULL, "Record not found\n");
|
util_assert(fld != NULL, "Record not found\n");
|
||||||
util_assert(fld->hdr != NULL, "Header for field not found\n");
|
util_assert(fld->hdr != NULL, "Header for field not found\n");
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
if (p->col_sep) {
|
if (p->col_sep) {
|
||||||
printf("%-*s %s %-*s\n", p->key_size, fld->hdr,
|
printf("%-*s %s %-*s\n", p->key_size, fld->hdr,
|
||||||
p->col_sep, fld->width, fld->val);
|
p->col_sep, fld->width, fld->val);
|
||||||
@@ -255,6 +302,7 @@ static void rec_print_long_hdr(struct util_rec *rec)
|
|||||||
buf = util_malloc(len + 1);
|
buf = util_malloc(len + 1);
|
||||||
memset(buf, p->hdr_sep[0], len);
|
memset(buf, p->hdr_sep[0], len);
|
||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
printf("%s\n", buf);
|
printf("%s\n", buf);
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
@@ -277,19 +325,24 @@ static void rec_print_long(struct util_rec *rec)
|
|||||||
continue;
|
continue;
|
||||||
if (!fld->val)
|
if (!fld->val)
|
||||||
continue;
|
continue;
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
item = argz_next(fld->val, fld->len, item);
|
item = argz_next(fld->val, fld->len, item);
|
||||||
if (p->col_sep) {
|
if (p->col_sep) {
|
||||||
printf(" %-*s %s %s\n",
|
printf(" %-*s %s %s\n",
|
||||||
p->key_size - 8, fld->hdr, p->col_sep, item);
|
p->key_size - 8, fld->hdr, p->col_sep, item);
|
||||||
while ((item = argz_next(fld->val, fld->len, item)))
|
while ((item = argz_next(fld->val, fld->len, item))) {
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
printf(" %-*s %c %s\n",
|
printf(" %-*s %c %s\n",
|
||||||
p->key_size - 8, "", p->argz_sep, item);
|
p->key_size - 8, "", p->argz_sep, item);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
printf(" %-*s %s\n",
|
printf(" %-*s %s\n",
|
||||||
p->key_size - 8, fld->hdr, fld->val);
|
p->key_size - 8, fld->hdr, fld->val);
|
||||||
while ((item = argz_next(fld->val, fld->len, item)))
|
while ((item = argz_next(fld->val, fld->len, item))) {
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
printf(" %-*s %s\n",
|
printf(" %-*s %s\n",
|
||||||
p->key_size - 8, "", item);
|
p->key_size - 8, "", item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
@@ -320,6 +373,7 @@ struct util_rec *util_rec_new_csv(const char *col_sep)
|
|||||||
rec->fmt.type = REC_FMT_CSV;
|
rec->fmt.type = REC_FMT_CSV;
|
||||||
rec->fmt.d.csv_p.col_sep = util_strdup(col_sep);
|
rec->fmt.d.csv_p.col_sep = util_strdup(col_sep);
|
||||||
rec->fmt.d.csv_p.argz_sep = ' ';
|
rec->fmt.d.csv_p.argz_sep = ' ';
|
||||||
|
rec->fmt.indent = 0;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,6 +386,7 @@ void rec_print_csv_hdr(struct util_rec *rec)
|
|||||||
struct util_rec_fld *fld;
|
struct util_rec_fld *fld;
|
||||||
int fld_count = 0;
|
int fld_count = 0;
|
||||||
|
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
util_list_iterate(rec->list, fld) {
|
util_list_iterate(rec->list, fld) {
|
||||||
if (fld_count)
|
if (fld_count)
|
||||||
printf("%c", *col_sep);
|
printf("%c", *col_sep);
|
||||||
@@ -354,6 +409,7 @@ void rec_print_csv(struct util_rec *rec)
|
|||||||
int fld_count = 0;
|
int fld_count = 0;
|
||||||
char *item = NULL;
|
char *item = NULL;
|
||||||
|
|
||||||
|
rec_print_indention(rec->fmt.indent);
|
||||||
util_list_iterate(rec->list, fld) {
|
util_list_iterate(rec->list, fld) {
|
||||||
item = argz_next(fld->val, fld->len, item);
|
item = argz_next(fld->val, fld->len, item);
|
||||||
if (fld_count)
|
if (fld_count)
|
||||||
@@ -470,6 +526,24 @@ void util_rec_print_hdr(struct util_rec *rec)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print record separator according to output format
|
||||||
|
*
|
||||||
|
* @param[in] rec Record pointer
|
||||||
|
*/
|
||||||
|
void util_rec_print_separator(struct util_rec *rec)
|
||||||
|
{
|
||||||
|
switch (rec->fmt.type) {
|
||||||
|
case REC_FMT_WIDE:
|
||||||
|
rec_print_wide_separator(rec);
|
||||||
|
break;
|
||||||
|
case REC_FMT_LONG:
|
||||||
|
break;
|
||||||
|
case REC_FMT_CSV:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a field value to an argz vector
|
* Set a field value to an argz vector
|
||||||
*
|
*
|
||||||
@@ -537,3 +611,14 @@ const char *util_rec_get(struct util_rec *rec, const char *key)
|
|||||||
|
|
||||||
return (fld != NULL) ? fld->val : NULL;
|
return (fld != NULL) ? fld->val : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the indentation of the record
|
||||||
|
*
|
||||||
|
* @param[in] rec Record pointer
|
||||||
|
* @param[in] indent Number of characters to indent
|
||||||
|
*/
|
||||||
|
void util_rec_set_indent(struct util_rec *rec, int indent)
|
||||||
|
{
|
||||||
|
rec->fmt.indent = indent;
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ static void print_records(const char *format, struct util_rec *rec)
|
|||||||
/* Print the record */
|
/* Print the record */
|
||||||
util_rec_print(rec);
|
util_rec_print(rec);
|
||||||
}
|
}
|
||||||
|
/* Print a separator line (is a nop for long and csv format) */
|
||||||
|
util_rec_print_separator(rec);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +74,11 @@ int main(void)
|
|||||||
print_records("Wide format", rec);
|
print_records("Wide format", rec);
|
||||||
util_rec_free(rec);
|
util_rec_free(rec);
|
||||||
|
|
||||||
|
rec = util_rec_new_wide("-");
|
||||||
|
util_rec_set_indent(rec, 4);
|
||||||
|
print_records("Wide format with indentation", rec);
|
||||||
|
util_rec_free(rec);
|
||||||
|
|
||||||
rec = util_rec_new_long("-", ":", "number", 30, 20);
|
rec = util_rec_new_long("-", ":", "number", 30, 20);
|
||||||
print_records("Long format", rec);
|
print_records("Long format", rec);
|
||||||
util_rec_free(rec);
|
util_rec_free(rec);
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ static int __scandir(struct dirent ***de_vec, const char *path,
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
|
|
||||||
|
*de_vec = NULL;
|
||||||
dirp = opendir(path);
|
dirp = opendir(path);
|
||||||
if (!dirp)
|
if (!dirp)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -134,13 +135,13 @@ int util_scandir_hexsort(const struct dirent **de1, const struct dirent **de2)
|
|||||||
* directory entries. The entries as well as the pointer array itself are
|
* directory entries. The entries as well as the pointer array itself are
|
||||||
* allocated by the function and has to be released by the user via free.
|
* allocated by the function and has to be released by the user via free.
|
||||||
*
|
*
|
||||||
* @param[out] de_vec Vector of matched directory entries
|
* @param[out] de_vec Vector of matched directory entries, or NULL
|
||||||
* @param[in] compar_fn Callback function for sorting the entry list
|
* @param[in] compar_fn Callback function for sorting the entry list
|
||||||
* @param[in] path Path to the directory to scan
|
* @param[in] path Path to the directory to scan
|
||||||
* @param[in] fmt Format string, describes the search pattern as POSIX regex
|
* @param[in] fmt Format string, describes the search pattern as POSIX regex
|
||||||
* @param[in] ... Values for format string
|
* @param[in] ... Values for format string
|
||||||
*
|
*
|
||||||
* @returns Number of returned directory entries
|
* @returns Number of returned directory entries, or -1 on error
|
||||||
*/
|
*/
|
||||||
int util_scandir(struct dirent ***de_vec,
|
int util_scandir(struct dirent ***de_vec,
|
||||||
int compar_fn(const struct dirent **first,
|
int compar_fn(const struct dirent **first,
|
||||||
|
|||||||
19
libvmcp/Makefile
Normal file
19
libvmcp/Makefile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
include ../common.mak
|
||||||
|
|
||||||
|
lib = libvmcp.a
|
||||||
|
|
||||||
|
examples = vmcp_example
|
||||||
|
|
||||||
|
all: $(lib)
|
||||||
|
examples: $(lib) $(examples)
|
||||||
|
|
||||||
|
objects = vmcp.o
|
||||||
|
|
||||||
|
$(lib): $(objects)
|
||||||
|
|
||||||
|
install: all
|
||||||
|
|
||||||
|
vmcp_example: vmcp_example.o $(lib) $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(lib) $(examples)
|
||||||
134
libvmcp/vmcp.c
Normal file
134
libvmcp/vmcp.c
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* vmcp - z/VM CP function library
|
||||||
|
*
|
||||||
|
* Copyright IBM Corp. 2018
|
||||||
|
*
|
||||||
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
|
#include "lib/vmcp.h"
|
||||||
|
|
||||||
|
#define VMCP_DEVICE_NODE "/dev/vmcp"
|
||||||
|
#define VMCP_GETSIZE _IOR(0x10, 3, int)
|
||||||
|
#define VMCP_SETBUF _IOW(0x10, 2, int)
|
||||||
|
#define VMCP_GETCODE _IOR(0x10, 1, int)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read at most COUNT bytes from FD into memory at location BUF.
|
||||||
|
* Return number of bytes read on success, -1 on error.
|
||||||
|
*/
|
||||||
|
static ssize_t read_buffer(int fd, char *buf, ssize_t count)
|
||||||
|
{
|
||||||
|
ssize_t ret, done;
|
||||||
|
|
||||||
|
for (done = 0; done < (ssize_t)count; done += ret) {
|
||||||
|
ret = read(fd, &buf[done], count - done);
|
||||||
|
if (ret == -1 && errno == EINTR)
|
||||||
|
continue;
|
||||||
|
if (ret == -1)
|
||||||
|
return -1;
|
||||||
|
if (ret == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Submit a command to z/VM CP and return the response, the size in bytes
|
||||||
|
* of the response and CP command response code.
|
||||||
|
*
|
||||||
|
* The member response contains the response from CP. It is a pointer
|
||||||
|
* to a malloc'ed buffer which must be freed by the caller when the return
|
||||||
|
* code is zero or VMCP_ERR_TOOSMALL.
|
||||||
|
*
|
||||||
|
* @param[in,out] cmd Pointer to struct vmcp_parm.
|
||||||
|
* @param[in] cpcmd Pointer to CP command string.
|
||||||
|
* @param[in] do_upper If true convert cpcmd string to upper case.
|
||||||
|
* @param[out] cprc Return code of the CP command.
|
||||||
|
* @param[out] response Return buffer, has been allocated via malloc()
|
||||||
|
* must be freed by caller, see below.
|
||||||
|
* @param[out] response_size Size of the response in bytes, can be larger
|
||||||
|
* than buffer_size.
|
||||||
|
*
|
||||||
|
* @returns Zero on success or a negative error number on failure.
|
||||||
|
* @retval VMCP_SUCCESS Success valid members: cprc, response,
|
||||||
|
* response_size
|
||||||
|
* @retval VMCP_ERR_OPEN Error opening VMCP device, valid members: none
|
||||||
|
* @retval VMCP_ERR_SETBUF Error setting buffer, valid members: none
|
||||||
|
* @retval VMCP_ERR_GETCODE Error getting cp exit code, valid members: none
|
||||||
|
* @retval VMCP_ERR_WRITE Error write CP command, valid members: none
|
||||||
|
* @retval VMCP_ERR_GETSIZE Error reading response size,
|
||||||
|
* valid members: cprc
|
||||||
|
* @retval VMCP_ERR_READ Error reading resp
|
||||||
|
* @retval VMCP_ERR_TOOSMALL Error response buffer too small, response
|
||||||
|
* truncated, valid members: cprc, response,
|
||||||
|
* response_size
|
||||||
|
*/
|
||||||
|
int vmcp(struct vmcp_parm *cmd)
|
||||||
|
{
|
||||||
|
int rc = VMCP_SUCCESS, fd, len;
|
||||||
|
char *cpcmd;
|
||||||
|
|
||||||
|
cmd->response = NULL;
|
||||||
|
cmd->response_size = 0;
|
||||||
|
cmd->cprc = 0;
|
||||||
|
|
||||||
|
fd = open(VMCP_DEVICE_NODE, O_RDWR);
|
||||||
|
if (fd == -1)
|
||||||
|
return VMCP_ERR_OPEN;
|
||||||
|
|
||||||
|
cpcmd = util_strdup(cmd->cpcmd); /* Exits on failure */
|
||||||
|
if (cmd->do_upper)
|
||||||
|
util_str_toupper(cpcmd);
|
||||||
|
|
||||||
|
if (ioctl(fd, VMCP_SETBUF, &cmd->buffer_size) == -1) {
|
||||||
|
rc = VMCP_ERR_SETBUF;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (write(fd, cpcmd, strlen(cpcmd)) == -1) {
|
||||||
|
rc = VMCP_ERR_WRITE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ioctl(fd, VMCP_GETCODE, &cmd->cprc) == -1) {
|
||||||
|
rc = VMCP_ERR_GETCODE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ioctl(fd, VMCP_GETSIZE, &cmd->response_size) == -1) {
|
||||||
|
rc = VMCP_ERR_GETSIZE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cmd->response_size <= cmd->buffer_size) {
|
||||||
|
len = cmd->response_size;
|
||||||
|
} else {
|
||||||
|
len = cmd->buffer_size;
|
||||||
|
rc = VMCP_ERR_TOOSMALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Exits on failure */
|
||||||
|
cmd->response = (char *)util_zalloc(len + 1);
|
||||||
|
|
||||||
|
if (read_buffer(fd, cmd->response, len) == -1) {
|
||||||
|
rc = VMCP_ERR_READ;
|
||||||
|
free(cmd->response);
|
||||||
|
cmd->response = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
|
close(fd);
|
||||||
|
free(cpcmd);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
65
libvmcp/vmcp_example.c
Normal file
65
libvmcp/vmcp_example.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/**
|
||||||
|
* vmcp_example - Example program for vmcp.c
|
||||||
|
*
|
||||||
|
* Copyright 2018 IBM Corp.
|
||||||
|
*
|
||||||
|
* s390-tools is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! [code]
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <err.h>
|
||||||
|
|
||||||
|
#include "lib/vmcp.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Demonstrate vmcp() function usage
|
||||||
|
*/
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
struct vmcp_parm cp;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
cp.cpcmd = "q osa";
|
||||||
|
cp.buffer_size = VMCP_DEFAULT_BUFSZ;
|
||||||
|
cp.do_upper = true;
|
||||||
|
|
||||||
|
rc = vmcp(&cp);
|
||||||
|
|
||||||
|
switch (rc) {
|
||||||
|
case VMCP_SUCCESS:
|
||||||
|
printf("%s\n", cp.response);
|
||||||
|
free(cp.response);
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_OPEN:
|
||||||
|
errx(EXIT_FAILURE, "Could not open device %s", VMCP_DEVICE_NODE);
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_SETBUF:
|
||||||
|
errx(EXIT_FAILURE, "Could not set buffer size");
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_GETCODE:
|
||||||
|
errx(EXIT_FAILURE, "Could not query return code");
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_GETSIZE:
|
||||||
|
errx(EXIT_FAILURE, "Could not query response size");
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_WRITE:
|
||||||
|
errx(EXIT_FAILURE, "Could not issue CP command");
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_READ:
|
||||||
|
errx(EXIT_FAILURE, "Could not read CP response");
|
||||||
|
break;
|
||||||
|
case VMCP_ERR_TOOSMALL:
|
||||||
|
free(cp.response);
|
||||||
|
printf("Response truncated (requires %u bytes)\n",
|
||||||
|
cp.response_size);
|
||||||
|
errx(EXIT_FAILURE, "Response buffer (%u bytes) too small",
|
||||||
|
cp.buffer_size);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! [code]
|
||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
const char *what(void) const { return msg; }
|
const char *what(void) const { return msg; }
|
||||||
int code(void) const { return errorCode; }
|
int code(void) const { return errorCode; }
|
||||||
protected:
|
protected:
|
||||||
char msg[200];
|
char msg[2048];
|
||||||
int errorCode;
|
int errorCode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -98,19 +98,20 @@ VMDump::VMDump(const char *fileName) : Dump(fileName, "rb")
|
|||||||
dump_read(&adsrRecord,sizeof(adsrRecord),1,fh);
|
dump_read(&adsrRecord,sizeof(adsrRecord),1,fh);
|
||||||
|
|
||||||
if(debug) {
|
if(debug) {
|
||||||
|
char buf_asc[1024];
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
fprintf(stderr, "off=%d\n", adsrRecord.sec5_offset);
|
fprintf(stderr, "off=%d\n", adsrRecord.sec5_offset);
|
||||||
dump_seek(fh, adsrRecord.sec5_offset, SEEK_SET);
|
dump_seek(fh, adsrRecord.sec5_offset, SEEK_SET);
|
||||||
dump_read(buf, adsrRecord.sec5_len, 1, fh);
|
dump_read(buf, adsrRecord.sec5_len, 1, fh);
|
||||||
ebcAsc(buf, adsrRecord.sec5_len);
|
ebcAsc(buf, buf_asc, adsrRecord.sec5_len);
|
||||||
for (i=0; i < adsrRecord.sec5_len; i++) {
|
for (i=0; i < adsrRecord.sec5_len; i++) {
|
||||||
if ((buf[i]==0) || iscntrl(buf[i]))
|
if ((buf_asc[i]==0) || iscntrl(buf_asc[i]))
|
||||||
buf[i]=' ';
|
buf_asc[i]=' ';
|
||||||
}
|
}
|
||||||
buf[adsrRecord.sec5_len] = 0;
|
buf_asc[adsrRecord.sec5_len] = 0;
|
||||||
printf("symptom string1: %s\n",buf);
|
printf("symptom string1: %s\n",buf_asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Record 2: fmbk */
|
/* Record 2: fmbk */
|
||||||
@@ -142,7 +143,8 @@ struct timeval VMDump::getDumpTime(void) const
|
|||||||
void VMDump::printDebug(void)
|
void VMDump::printDebug(void)
|
||||||
{
|
{
|
||||||
struct timeval time;
|
struct timeval time;
|
||||||
char buf[1024];
|
char fmbk_id[8];
|
||||||
|
char albk_id[8];
|
||||||
|
|
||||||
s390TodToTimeval(adsrRecord.tod, &time);
|
s390TodToTimeval(adsrRecord.tod, &time);
|
||||||
|
|
||||||
@@ -165,9 +167,9 @@ void VMDump::printDebug(void)
|
|||||||
|
|
||||||
/* fmbk */
|
/* fmbk */
|
||||||
|
|
||||||
ebcAsc(fmbkRecord.id, sizeof(fmbkRecord.id));
|
ebcAsc(fmbkRecord.id, fmbk_id, sizeof(fmbkRecord.id));
|
||||||
fmbkRecord.id[7] = 0;
|
fmbk_id[7] = 0;
|
||||||
printf("id : %s\n", fmbkRecord.id);
|
printf("id : %s\n", fmbk_id);
|
||||||
printf("fir rec nr: %i\n", fmbkRecord.rec_nr_fir);
|
printf("fir rec nr: %i\n", fmbkRecord.rec_nr_fir);
|
||||||
printf("vec rec nr: %i\n", fmbkRecord.rec_nr_vector);
|
printf("vec rec nr: %i\n", fmbkRecord.rec_nr_vector);
|
||||||
printf("access rec nr: %i\n", fmbkRecord.rec_nr_access);
|
printf("access rec nr: %i\n", fmbkRecord.rec_nr_access);
|
||||||
@@ -175,21 +177,9 @@ void VMDump::printDebug(void)
|
|||||||
|
|
||||||
/* albk */
|
/* albk */
|
||||||
|
|
||||||
memcpy(buf, albkRecord.id, sizeof(albkRecord.id));
|
ebcAsc(albkRecord.id, albk_id, sizeof(albkRecord.id));
|
||||||
ebcAsc(buf, sizeof(albkRecord.id));
|
albk_id[7]=0;
|
||||||
buf[8]=0;
|
printf("ALBK id : %s\n",albk_id);
|
||||||
printf("ALBK id : %s\n",buf);
|
|
||||||
|
|
||||||
/* asibk */
|
|
||||||
/*
|
|
||||||
XXX
|
|
||||||
memcpy(buf,asibkRecord.id,sizeof(asibkRecord.id));
|
|
||||||
ebcAsc(buf,sizeof(asibkRecord.id));
|
|
||||||
asibkRecord.id[8]=0;
|
|
||||||
printf("ASIBK id : %s\n",buf);
|
|
||||||
printf("storage : %x\n",asibkRecord.storage_size_2GB);
|
|
||||||
printf("bitmapsrecs : %i\n",asibkRecord.nr_of_recs_of_first_bit_map);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VMDump::printInfo(void)
|
void VMDump::printInfo(void)
|
||||||
|
|||||||
@@ -140,9 +140,15 @@ protected:
|
|||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
inline void ebcAsc(char *inout, size_t len) const
|
inline void ebcAsc(char *in, char *out, size_t size) const
|
||||||
{
|
{
|
||||||
iconv(ebcdicAsciiConv, &inout, &len, &inout, &len);
|
size_t size_out = size;
|
||||||
|
size_t size_in = size;
|
||||||
|
size_t rc;
|
||||||
|
|
||||||
|
rc = iconv(ebcdicAsciiConv, &in, &size_in, &out, &size_out);
|
||||||
|
if (rc == (size_t) -1)
|
||||||
|
throw(DumpException("Code page translation EBCDIC-ASCII failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Members */
|
/* Members */
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ void vtoc_volume_label_set_volser (volume_label_t *vlabel, char *volser)
|
|||||||
|
|
||||||
strcpy(s, " ");
|
strcpy(s, " ");
|
||||||
vtoc_ebcdic_enc(s, s, VOLSER_LENGTH);
|
vtoc_ebcdic_enc(s, s, VOLSER_LENGTH);
|
||||||
strncpy(vlabel->volid, s, VOLSER_LENGTH);
|
memcpy(vlabel->volid, s, VOLSER_LENGTH);
|
||||||
|
|
||||||
if (i > VOLSER_LENGTH) i = VOLSER_LENGTH;
|
if (i > VOLSER_LENGTH) i = VOLSER_LENGTH;
|
||||||
|
|
||||||
@@ -743,8 +743,8 @@ static void vtoc_init_format_1_8_label (
|
|||||||
bzero(f1->DS1DSNAM, sizeof(f1->DS1DSNAM));
|
bzero(f1->DS1DSNAM, sizeof(f1->DS1DSNAM));
|
||||||
sprintf(str, "PART .NEW ");
|
sprintf(str, "PART .NEW ");
|
||||||
vtoc_ebcdic_enc(str, str, 44);
|
vtoc_ebcdic_enc(str, str, 44);
|
||||||
strncpy(f1->DS1DSNAM, str, 44);
|
memcpy(f1->DS1DSNAM, str, 44);
|
||||||
strncpy((char *) f1->DS1DSSN, " ", 6);
|
memcpy((char *) f1->DS1DSSN, " ", 6);
|
||||||
f1->DS1VOLSQ = 0x0001;
|
f1->DS1VOLSQ = 0x0001;
|
||||||
|
|
||||||
vtoc_set_date(&f1->DS1CREDT,
|
vtoc_set_date(&f1->DS1CREDT,
|
||||||
@@ -758,7 +758,7 @@ static void vtoc_init_format_1_8_label (
|
|||||||
f1->DS1NOBDB = 0x00;
|
f1->DS1NOBDB = 0x00;
|
||||||
f1->DS1FLAG1 = 0x00;
|
f1->DS1FLAG1 = 0x00;
|
||||||
vtoc_ebcdic_enc("IBM LINUX ", str, 13);
|
vtoc_ebcdic_enc("IBM LINUX ", str, 13);
|
||||||
strncpy((char *)f1->DS1SYSCD, str, 13);
|
memcpy((char *)f1->DS1SYSCD, str, 13);
|
||||||
vtoc_set_date(&f1->DS1REFD,
|
vtoc_set_date(&f1->DS1REFD,
|
||||||
(u_int8_t) creatime->tm_year,
|
(u_int8_t) creatime->tm_year,
|
||||||
(u_int16_t) creatime->tm_yday);
|
(u_int16_t) creatime->tm_yday);
|
||||||
|
|||||||
184
libzds/libzds.c
184
libzds/libzds.c
@@ -22,8 +22,6 @@
|
|||||||
#include "lib/dasd_base.h"
|
#include "lib/dasd_base.h"
|
||||||
#include "lib/libzds.h"
|
#include "lib/libzds.h"
|
||||||
#include "lib/u2s.h"
|
#include "lib/u2s.h"
|
||||||
#include "lib/util_base.h"
|
|
||||||
#include "lib/util_list.h"
|
|
||||||
#include "lib/vtoc.h"
|
#include "lib/vtoc.h"
|
||||||
|
|
||||||
/** @cond PRIVATE */
|
/** @cond PRIVATE */
|
||||||
@@ -70,42 +68,6 @@ struct errormsg {
|
|||||||
char text[ERRORMSG];
|
char text[ERRORMSG];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* As the VTOC is the data area on the DASD that describes all data sets,
|
|
||||||
* this library will often have to refer to the various records in the VTOC.
|
|
||||||
* To make this more efficiant, we will read the whole VTOC once and identify
|
|
||||||
* all elements (DSCBs). The raw data of the VTOC tracks and the index to the
|
|
||||||
* DSCBs is stored.
|
|
||||||
*/
|
|
||||||
struct raw_vtoc {
|
|
||||||
/** @brief The raw track data */
|
|
||||||
char *rawdata;
|
|
||||||
/** @brief This size of the raw track data in bytes */
|
|
||||||
unsigned long long rawdatasize;
|
|
||||||
/** @brief An array with pointers to the various DSCBs in the rawdata */
|
|
||||||
char **vtocindex;
|
|
||||||
/** @brief Number of entries in the index */
|
|
||||||
unsigned int vtocindexcount;
|
|
||||||
/** @brief Number of records per VTOC track
|
|
||||||
*
|
|
||||||
* @note While the DS4DEVDT field in the format 4 DSCB names the number
|
|
||||||
* if DSCBs per VTOC track, we count the records, which is DS4DEVDT + 1
|
|
||||||
* for record 0.
|
|
||||||
*/
|
|
||||||
unsigned int vtoc_rec_per_track;
|
|
||||||
/** @brief The track number in which the vtoc begins on the DASD */
|
|
||||||
unsigned int vtoctrackoffset;
|
|
||||||
/** @brief Start record of VTOC.
|
|
||||||
*
|
|
||||||
* The rawdata contains full tracks. This is the number of the first
|
|
||||||
* record that actually belongs to the VTOC */
|
|
||||||
unsigned int vtocrecno;
|
|
||||||
/** @brief The DASD this vtoc was read from */
|
|
||||||
struct dasd *dasd;
|
|
||||||
/** @brief Detailed error messages in case of a problem */
|
|
||||||
struct errorlog *log;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dscbiterator {
|
struct dscbiterator {
|
||||||
/** @brief The raw_vtoc this iterator refers to */
|
/** @brief The raw_vtoc this iterator refers to */
|
||||||
struct raw_vtoc *rawvtoc;
|
struct raw_vtoc *rawvtoc;
|
||||||
@@ -113,31 +75,6 @@ struct dscbiterator {
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dasd {
|
|
||||||
/** @brief List head used to store a list of DASDs in struct zdsroot */
|
|
||||||
struct util_list_node list;
|
|
||||||
/** @brief Name of the block device, e.g. /dev/dasde */
|
|
||||||
char *device;
|
|
||||||
/** @brief File descriptor for the block device.
|
|
||||||
*
|
|
||||||
* The device is kept open for as along as the library uses it.
|
|
||||||
* This lets the system know that the device is still in use.
|
|
||||||
*/
|
|
||||||
int inusefd;
|
|
||||||
/* @brief where to find the volume label */
|
|
||||||
unsigned int label_block;
|
|
||||||
/** @brief Device geometry. How many cylinders does the DASD have. */
|
|
||||||
unsigned int cylinders;
|
|
||||||
/** @brief Device geometry. How many heads does the DASD have. */
|
|
||||||
unsigned int heads;
|
|
||||||
/** @brief The VTOC data that has been read from this device */
|
|
||||||
struct raw_vtoc *rawvtoc;
|
|
||||||
/** @brief The volume label that has been read from this device */
|
|
||||||
volume_label_t *vlabel;
|
|
||||||
/** @brief Detailed error messages in case of a problem */
|
|
||||||
struct errorlog *log;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dasdhandle {
|
struct dasdhandle {
|
||||||
/** @brief The struct dasd this context relates to */
|
/** @brief The struct dasd this context relates to */
|
||||||
struct dasd *dasd;
|
struct dasd *dasd;
|
||||||
@@ -412,6 +349,29 @@ int lzds_zdsroot_alloc(struct zdsroot **root)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It should be noted that this frees all structures that are owned by the
|
||||||
|
* root structure as well. For example, a pointer to a struct dasd that
|
||||||
|
* has been returned by lzds_zdsroot_add_device is not valid anymore.
|
||||||
|
*
|
||||||
|
* @param[in] root Reference to the zdsroot structure that is to be freed.
|
||||||
|
*/
|
||||||
|
void lzds_dslist_free(struct zdsroot *root)
|
||||||
|
{
|
||||||
|
struct dataset *ds, *nextds;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
util_list_iterate_safe(root->datasetlist, ds, nextds) {
|
||||||
|
util_list_remove(root->datasetlist, ds);
|
||||||
|
dataset_free_memberlist(ds);
|
||||||
|
for (i = 0; i < MAXVOLUMESPERDS; ++i)
|
||||||
|
free(ds->dsp[i]);
|
||||||
|
errorlog_free(ds->log);
|
||||||
|
free(ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It should be noted that this frees all structures that are owned by the
|
* It should be noted that this frees all structures that are owned by the
|
||||||
* root structure as well. For example, a pointer to a struct dasd that
|
* root structure as well. For example, a pointer to a struct dasd that
|
||||||
@@ -422,8 +382,6 @@ int lzds_zdsroot_alloc(struct zdsroot **root)
|
|||||||
void lzds_zdsroot_free(struct zdsroot *root)
|
void lzds_zdsroot_free(struct zdsroot *root)
|
||||||
{
|
{
|
||||||
struct dasd *dasd, *nextdasd;
|
struct dasd *dasd, *nextdasd;
|
||||||
struct dataset *ds, *nextds;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!root)
|
if (!root)
|
||||||
return;
|
return;
|
||||||
@@ -433,15 +391,7 @@ void lzds_zdsroot_free(struct zdsroot *root)
|
|||||||
dasd_free(dasd);
|
dasd_free(dasd);
|
||||||
}
|
}
|
||||||
util_list_free(root->dasdlist);
|
util_list_free(root->dasdlist);
|
||||||
|
lzds_dslist_free(root);
|
||||||
util_list_iterate_safe(root->datasetlist, ds, nextds) {
|
|
||||||
util_list_remove(root->datasetlist, ds);
|
|
||||||
dataset_free_memberlist(ds);
|
|
||||||
for (i = 0; i < MAXVOLUMESPERDS; ++i)
|
|
||||||
free(ds->dsp[i]);
|
|
||||||
errorlog_free(ds->log);
|
|
||||||
free(ds);
|
|
||||||
}
|
|
||||||
util_list_free(root->datasetlist);
|
util_list_free(root->datasetlist);
|
||||||
errorlog_free(root->log);
|
errorlog_free(root->log);
|
||||||
free(root);
|
free(root);
|
||||||
@@ -1443,7 +1393,7 @@ int lzds_raw_vtoc_get_dscb_from_cchhb(struct raw_vtoc *rv, cchhb_t *p,
|
|||||||
* - EPROTO The VTOC data is not in a valid format.
|
* - EPROTO The VTOC data is not in a valid format.
|
||||||
* - EIO Other I/O error
|
* - EIO Other I/O error
|
||||||
*/
|
*/
|
||||||
int lzds_dasd_read_rawvtoc(struct dasd *dasd)
|
int lzds_dasd_read_rawvtoc(struct dasd *dasd, struct raw_vtoc *rawvtoc)
|
||||||
{
|
{
|
||||||
unsigned long long vtoctrckno, vtocrecno;
|
unsigned long long vtoctrckno, vtocrecno;
|
||||||
unsigned int vtoctrack_start, vtoctrack_end, vtocindexsize;
|
unsigned int vtoctrack_start, vtoctrack_end, vtocindexsize;
|
||||||
@@ -1455,26 +1405,11 @@ int lzds_dasd_read_rawvtoc(struct dasd *dasd)
|
|||||||
format4_label_t *f4;
|
format4_label_t *f4;
|
||||||
unsigned long long rawvtocsize;
|
unsigned long long rawvtocsize;
|
||||||
|
|
||||||
struct raw_vtoc *rawvtoc = NULL;
|
|
||||||
volume_label_t *vlabel = NULL;
|
volume_label_t *vlabel = NULL;
|
||||||
char *trackdata = NULL;
|
char *trackdata = NULL;
|
||||||
char vol1[] = {0xe5, 0xd6, 0xd3, 0xf1, 0x00}; /* "VOL1" in EBCDIC */
|
char vol1[] = {0xe5, 0xd6, 0xd3, 0xf1, 0x00}; /* "VOL1" in EBCDIC */
|
||||||
|
|
||||||
errorlog_clear(dasd->log);
|
errorlog_clear(dasd->log);
|
||||||
/* cleanup the old rawvtoc structures before we read new ones */
|
|
||||||
rawvtoc = dasd->rawvtoc;
|
|
||||||
dasd->rawvtoc = NULL;
|
|
||||||
if (rawvtoc) {
|
|
||||||
free(rawvtoc->rawdata);
|
|
||||||
free(rawvtoc->vtocindex);
|
|
||||||
free(rawvtoc);
|
|
||||||
}
|
|
||||||
|
|
||||||
rawvtoc = malloc(sizeof(*rawvtoc));
|
|
||||||
if (!rawvtoc)
|
|
||||||
return ENOMEM;
|
|
||||||
memset(rawvtoc, 0, sizeof(*rawvtoc));
|
|
||||||
rawvtoc->dasd = dasd;
|
|
||||||
|
|
||||||
rc = lzds_dasd_get_vlabel(dasd, &vlabel);
|
rc = lzds_dasd_get_vlabel(dasd, &vlabel);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -1611,13 +1546,49 @@ int lzds_dasd_read_rawvtoc(struct dasd *dasd)
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
dasd->rawvtoc = rawvtoc;
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
free(rawvtoc->vtocindex);
|
|
||||||
free(trackdata);
|
free(trackdata);
|
||||||
free(rawvtoc);
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param[in] dasd The struct dasd that represents the device we want to read
|
||||||
|
* the VTOC from.
|
||||||
|
* @return 0 on success, otherwise one of the following error codes:
|
||||||
|
* - ENOMEM Could not allocate internal structure due to lack of memory.
|
||||||
|
* - EINVAL The volume label has not yet been read or it is not valid.
|
||||||
|
* - EPROTO The VTOC data is not in a valid format.
|
||||||
|
* - EIO Other I/O error
|
||||||
|
*/
|
||||||
|
int lzds_dasd_alloc_rawvtoc(struct dasd *dasd)
|
||||||
|
{
|
||||||
|
struct raw_vtoc *rawvtoc = NULL;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
/* cleanup the old rawvtoc structures before we read new ones */
|
||||||
|
rawvtoc = dasd->rawvtoc;
|
||||||
|
dasd->rawvtoc = NULL;
|
||||||
|
if (rawvtoc) {
|
||||||
|
free(rawvtoc->rawdata);
|
||||||
|
free(rawvtoc->vtocindex);
|
||||||
|
free(rawvtoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
rawvtoc = malloc(sizeof(*rawvtoc));
|
||||||
|
if (!rawvtoc)
|
||||||
|
return ENOMEM;
|
||||||
|
memset(rawvtoc, 0, sizeof(*rawvtoc));
|
||||||
|
rawvtoc->dasd = dasd;
|
||||||
|
|
||||||
|
rc = lzds_dasd_read_rawvtoc(dasd, rawvtoc);
|
||||||
|
if (rc) {
|
||||||
|
free(rawvtoc->vtocindex);
|
||||||
|
free(rawvtoc);
|
||||||
|
} else {
|
||||||
|
dasd->rawvtoc = rawvtoc;
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2261,6 +2232,7 @@ out1:
|
|||||||
static int dataset_merge_dataset(struct dataset *baseds, struct dataset *newds)
|
static int dataset_merge_dataset(struct dataset *baseds, struct dataset *newds)
|
||||||
{
|
{
|
||||||
int k, l, dspcount;
|
int k, l, dspcount;
|
||||||
|
|
||||||
for (k = 0; k < MAXVOLUMESPERDS; ++k) {
|
for (k = 0; k < MAXVOLUMESPERDS; ++k) {
|
||||||
/* if both datasets have a part in position k,
|
/* if both datasets have a part in position k,
|
||||||
* then something is wrong */
|
* then something is wrong */
|
||||||
@@ -2280,18 +2252,20 @@ static int dataset_merge_dataset(struct dataset *baseds, struct dataset *newds)
|
|||||||
* Since dsp[0] may not be set yet, we loop over the
|
* Since dsp[0] may not be set yet, we loop over the
|
||||||
* base dsp array until we find an entry.
|
* base dsp array until we find an entry.
|
||||||
*/
|
*/
|
||||||
for (l = 0; l < MAXVOLUMESPERDS; ++l)
|
for (l = 0; l < MAXVOLUMESPERDS; ++l) {
|
||||||
if (baseds->dsp[l]) {
|
if (!baseds->dsp[l])
|
||||||
if (memcmp(baseds->dsp[l]->f1->DS1DSSN,
|
continue;
|
||||||
newds->dsp[k]->f1->DS1DSSN,
|
if (memcmp(baseds->dsp[l]->f1->DS1DSSN,
|
||||||
MAXVOLSER))
|
newds->dsp[k]->f1->DS1DSSN,
|
||||||
return errorlog_add_message(
|
MAXVOLSER))
|
||||||
&baseds->log, NULL, EPROTO,
|
return errorlog_add_message(
|
||||||
"merge dataset: part %d has incompatible"
|
&baseds->log, NULL, EPROTO,
|
||||||
" base volume serial\n", k);
|
"merge dataset: part %d has incompatible base volume serial\n",
|
||||||
else
|
k);
|
||||||
break;
|
else
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
baseds->dsp[k] = newds->dsp[k];
|
baseds->dsp[k] = newds->dsp[k];
|
||||||
baseds->dspcount++;
|
baseds->dspcount++;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ static char small_mon_record[SMALL_MON_RECORD_LEN];
|
|||||||
static char large_mon_record[LARGE_MON_RECORD_LEN];
|
static char large_mon_record[LARGE_MON_RECORD_LEN];
|
||||||
static long sample_interval = 60;
|
static long sample_interval = 60;
|
||||||
|
|
||||||
static const char *pid_file = "/var/run/mon_fsstatd.pid";
|
static const char *pid_file = "/run/mon_fsstatd.pid";
|
||||||
|
|
||||||
struct mw_name_lens {
|
struct mw_name_lens {
|
||||||
__u16 mw_name_len;
|
__u16 mw_name_len;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ static char buf[BUF_SIZE];
|
|||||||
static char mon_record[MAX_REC_LEN];
|
static char mon_record[MAX_REC_LEN];
|
||||||
static long sample_interval = 60;
|
static long sample_interval = 60;
|
||||||
|
|
||||||
static const char *pid_file = "/var/run/mon_procd.pid";
|
static const char *pid_file = "/run/mon_procd.pid";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clean up when SIGTERM or SIGINT received
|
* Clean up when SIGTERM or SIGINT received
|
||||||
@@ -594,17 +594,18 @@ static void cal_task_pcpu(struct task_t *task, const unsigned long long tics)
|
|||||||
*/
|
*/
|
||||||
static int read_stat(struct task_t *task)
|
static int read_stat(struct task_t *task)
|
||||||
{
|
{
|
||||||
int ppid, tty, proc;
|
unsigned long long maj_flt = 0, utime = 0, stime = 0, cutime = 0,
|
||||||
unsigned long flags, pri, nice;
|
cstime = 0;
|
||||||
unsigned long long maj_flt, utime, stime, cutime, cstime;
|
unsigned long flags = 0, pri = 0, nice = 0;
|
||||||
char *cmd_start, *cmd_end, *cmdlenp, *cmdp;
|
char *cmd_start, *cmd_end, *cmdlenp, *cmdp;
|
||||||
|
int ppid = 0, tty = 0, proc = 0, rc;
|
||||||
|
|
||||||
snprintf(fname, sizeof(fname), "/proc/%u/stat", task->pid);
|
snprintf(fname, sizeof(fname), "/proc/%u/stat", task->pid);
|
||||||
if (read_file(fname, buf, sizeof(buf) - 1) == -1)
|
if (read_file(fname, buf, sizeof(buf) - 1) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cmd_start = strchr(buf, '(') + 1;
|
cmd_start = strchr(buf, '(') + 1;
|
||||||
cmd_end = strchr(cmd_start, ')');
|
cmd_end = strrchr(cmd_start, ')');
|
||||||
name_lens.cmd_len = cmd_end - cmd_start;
|
name_lens.cmd_len = cmd_end - cmd_start;
|
||||||
cmdlenp = mon_record + sizeof(struct monwrite_hdr);
|
cmdlenp = mon_record + sizeof(struct monwrite_hdr);
|
||||||
cmdlenp += sizeof(struct procd_hdr);
|
cmdlenp += sizeof(struct procd_hdr);
|
||||||
@@ -625,7 +626,7 @@ static int read_stat(struct task_t *task)
|
|||||||
memcpy(cmdlenp, &name_lens.cmd_len, sizeof(__u16));
|
memcpy(cmdlenp, &name_lens.cmd_len, sizeof(__u16));
|
||||||
|
|
||||||
cmd_end += 2;
|
cmd_end += 2;
|
||||||
sscanf(cmd_end,
|
rc = sscanf(cmd_end,
|
||||||
"%c %d %*d %*d %d %*d "
|
"%c %d %*d %*d %d %*d "
|
||||||
"%lu %*s %*s %Lu %*s "
|
"%lu %*s %*s %Lu %*s "
|
||||||
"%Lu %Lu %Lu %Lu "
|
"%Lu %Lu %Lu %Lu "
|
||||||
@@ -642,6 +643,8 @@ static int read_stat(struct task_t *task)
|
|||||||
&utime, &stime, &cutime, &cstime,
|
&utime, &stime, &cutime, &cstime,
|
||||||
&pri, &nice,
|
&pri, &nice,
|
||||||
&proc);
|
&proc);
|
||||||
|
if (rc != 12)
|
||||||
|
syslog(LOG_ERR, "bad data in %s \n", fname);
|
||||||
task->ppid = (__u32)ppid;
|
task->ppid = (__u32)ppid;
|
||||||
task->tty = (__u16)tty;
|
task->tty = (__u16)tty;
|
||||||
task->flags = (__u32)flags;
|
task->flags = (__u32)flags;
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ echo "$cmd: Copying virtio modules"
|
|||||||
mkdir -p $builddir/$netdir
|
mkdir -p $builddir/$netdir
|
||||||
mkdir -p $builddir/$blkdir
|
mkdir -p $builddir/$blkdir
|
||||||
set +e
|
set +e
|
||||||
cp $netdir/virtio_net.ko $builddir/$netdir 2> /dev/null
|
cp $netdir/virtio_net.ko* $builddir/$netdir 2> /dev/null
|
||||||
cp $blkdir/virtio_blk.ko $builddir/$blkdir 2> /dev/null
|
cp $blkdir/virtio_blk.ko* $builddir/$blkdir 2> /dev/null
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Busybox (+ dependencies)
|
# Busybox (+ dependencies)
|
||||||
@@ -170,7 +170,7 @@ cat <<'EOF' > $builddir/init
|
|||||||
/bin/mount -t tmpfs none /run
|
/bin/mount -t tmpfs none /run
|
||||||
|
|
||||||
/sbin/modprobe virtio_net
|
/sbin/modprobe virtio_net
|
||||||
/sbin/udhcpc -O pxeconffile -O pxepathprefix &
|
/sbin/udhcpc -O pxeconffile -O pxepathprefix -x 93:001F &
|
||||||
|
|
||||||
/sbin/pxeboot.script
|
/sbin/pxeboot.script
|
||||||
EOF
|
EOF
|
||||||
@@ -237,6 +237,7 @@ case "$1" in
|
|||||||
echo " router: $router"
|
echo " router: $router"
|
||||||
echo " domain: $domain $dns"
|
echo " domain: $domain $dns"
|
||||||
echo " tftp: $siaddr"
|
echo " tftp: $siaddr"
|
||||||
|
echo " pxepathprefix: $pxepathprefix"
|
||||||
# flush routes
|
# flush routes
|
||||||
/sbin/ip route flush table all
|
/sbin/ip route flush table all
|
||||||
# setup if link
|
# setup if link
|
||||||
@@ -272,6 +273,7 @@ case "$1" in
|
|||||||
echo "siaddr=$siaddr" > $PXECONF
|
echo "siaddr=$siaddr" > $PXECONF
|
||||||
echo "interface=$interface" >> $PXECONF
|
echo "interface=$interface" >> $PXECONF
|
||||||
echo "ip=$ip" >> $PXECONF
|
echo "ip=$ip" >> $PXECONF
|
||||||
|
echo "pxepathprefix=$pxepathprefix" >> $PXECONF
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -354,7 +356,7 @@ then
|
|||||||
for c in $CONFIGS
|
for c in $CONFIGS
|
||||||
do
|
do
|
||||||
echo "fetching config pxelinux.cfg/$c from $siaddr"
|
echo "fetching config pxelinux.cfg/$c from $siaddr"
|
||||||
if /usr/bin/tftp -g -l /tmp/config -r pxelinux.cfg/$c $siaddr
|
if /usr/bin/tftp -g -l /tmp/config -r ${pxepathprefix}pxelinux.cfg/$c $siaddr
|
||||||
then
|
then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -371,6 +373,7 @@ fi
|
|||||||
kernel=$(/bin/grep -i "^[[:space:]]*kernel" /tmp/config | sed "s/^[[:space:]]*kernel[[:space:]]*//I")
|
kernel=$(/bin/grep -i "^[[:space:]]*kernel" /tmp/config | sed "s/^[[:space:]]*kernel[[:space:]]*//I")
|
||||||
initrd=$(/bin/grep -i "^[[:space:]]*initrd" /tmp/config | sed "s/^[[:space:]]*initrd[[:space:]]*//I")
|
initrd=$(/bin/grep -i "^[[:space:]]*initrd" /tmp/config | sed "s/^[[:space:]]*initrd[[:space:]]*//I")
|
||||||
append=$(/bin/grep -i "^[[:space:]]*append" /tmp/config | sed "s/^[[:space:]]*append[[:space:]]*//I")
|
append=$(/bin/grep -i "^[[:space:]]*append" /tmp/config | sed "s/^[[:space:]]*append[[:space:]]*//I")
|
||||||
|
ipappend=$(/bin/grep -i "^[[:space:]]*ipappend" /tmp/config | sed "s/^[[:space:]]*ipappend[[:space:]]*//I")
|
||||||
|
|
||||||
if [ -z "$kernel" ]
|
if [ -z "$kernel" ]
|
||||||
then
|
then
|
||||||
@@ -378,13 +381,13 @@ then
|
|||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo fetch kernel $kernel from $siaddr
|
echo fetch kernel $kernel from $siaddr
|
||||||
/usr/bin/tftp -g -l /tmp/kernel -r $kernel $siaddr
|
/usr/bin/tftp -g -l /tmp/kernel -r $pxepathprefix$kernel $siaddr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$initrd" ]
|
if [ -n "$initrd" ]
|
||||||
then
|
then
|
||||||
echo fetch initrd $initrd from $siaddr
|
echo fetch initrd $initrd from $siaddr
|
||||||
/usr/bin/tftp -g -l /tmp/initrd -r $initrd $siaddr
|
/usr/bin/tftp -g -l /tmp/initrd -r $pxepathprefix$initrd $siaddr
|
||||||
INITRD="--initrd=/tmp/initrd"
|
INITRD="--initrd=/tmp/initrd"
|
||||||
else
|
else
|
||||||
INITRD=""
|
INITRD=""
|
||||||
@@ -394,6 +397,9 @@ if [ -z "$append" ]; then
|
|||||||
echo "Kexec load: kexec -l /tmp/kernel $INITRD"
|
echo "Kexec load: kexec -l /tmp/kernel $INITRD"
|
||||||
kexec -l /tmp/kernel $INITRD
|
kexec -l /tmp/kernel $INITRD
|
||||||
else
|
else
|
||||||
|
if [ "$ipappend" = "2" ]; then
|
||||||
|
$append="$append BOOTIF=01-$ifaddr"
|
||||||
|
fi
|
||||||
echo "Kexec load: kexec -l /tmp/kernel $INITRD --append=\"$append\""
|
echo "Kexec load: kexec -l /tmp/kernel $INITRD --append=\"$append\""
|
||||||
kexec -l /tmp/kernel $INITRD --append="$append"
|
kexec -l /tmp/kernel $INITRD --append="$append"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -85,20 +85,12 @@ void init_ibmOSAMib(void) {
|
|||||||
|
|
||||||
/* query OSA-E device driver for OSA-E devices and mark them in IF-MIB interface list */
|
/* query OSA-E device driver for OSA-E devices and mark them in IF-MIB interface list */
|
||||||
osaexp_num = query_OSA_EXP ( &if_list, ifNumber );
|
osaexp_num = query_OSA_EXP ( &if_list, ifNumber );
|
||||||
if ( osaexp_num < 0 )
|
if ( osaexp_num == 0 )
|
||||||
{
|
{
|
||||||
fprintf( stderr, "init_ibmOSAMib(): "
|
get_time( time_buf );
|
||||||
"OSA-E device driver query interface ioctl() failed\n"
|
snmp_log( LOG_ERR, "%s init_ibmOSAMib(): none of the %d interfaces is a real "
|
||||||
"check agent log file for more details\n"
|
"OSA-E device - starting subagent anyway\n", time_buf, ifNumber);
|
||||||
"Cannot start subagent...exiting...\n");
|
return;
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else if ( osaexp_num == 0 )
|
|
||||||
{
|
|
||||||
fprintf( stderr, "init_ibmOSAMib(): bad or no OSA-E devices reported\n"
|
|
||||||
"check agent log file for more details\n"
|
|
||||||
"Cannot start subagent...exiting...\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
/* end if */
|
/* end if */
|
||||||
|
|
||||||
|
|||||||
@@ -1204,18 +1204,7 @@ void update_mib_info ()
|
|||||||
* and mark them in IF-MIB interface list
|
* and mark them in IF-MIB interface list
|
||||||
* */
|
* */
|
||||||
osaexp_num = query_OSA_EXP( &tmp_list, if_num );
|
osaexp_num = query_OSA_EXP( &tmp_list, if_num );
|
||||||
if ( osaexp_num < 0 )
|
if ( osaexp_num == 0 )
|
||||||
{
|
|
||||||
get_time( time_buf );
|
|
||||||
fprintf( stderr, "%s update_mib_info(): "
|
|
||||||
"OSA-E device driver query interface ioctl() "
|
|
||||||
"failed\nupdate_mib_info(): going to stop osasnmpd daemon\n"
|
|
||||||
"update_mib_info(): check subagent logfile for more details\n"
|
|
||||||
"update_mib_info(): sending termination signal to osasnmpd...\n",
|
|
||||||
time_buf );
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
else if ( osaexp_num == 0 )
|
|
||||||
{
|
{
|
||||||
get_time( time_buf );
|
get_time( time_buf );
|
||||||
snmp_log( LOG_ERR, "%s update_mib_info(): "
|
snmp_log( LOG_ERR, "%s update_mib_info(): "
|
||||||
@@ -1698,9 +1687,8 @@ int query_IF_MIB ( IF_LIST** ifList )
|
|||||||
* IN int if_Number: number of network interfaces
|
* IN int if_Number: number of network interfaces
|
||||||
* returns: int num - number of OSA Express devices found on this
|
* returns: int num - number of OSA Express devices found on this
|
||||||
* system (>=0)
|
* system (>=0)
|
||||||
* -1 -an error occurred , no valid info avail
|
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
int query_OSA_EXP ( IF_LIST** ifList, int if_Number )
|
unsigned int query_OSA_EXP ( IF_LIST** ifList, int if_Number )
|
||||||
{
|
{
|
||||||
int j, num = 0;
|
int j, num = 0;
|
||||||
char time_buf[TIME_BUF_SIZE]; /* date/time buffer */
|
char time_buf[TIME_BUF_SIZE]; /* date/time buffer */
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void update_mib_info ( );
|
|||||||
int query_IF_MIB( IF_LIST** );
|
int query_IF_MIB( IF_LIST** );
|
||||||
|
|
||||||
/* retrieves OSA Express interface information from kernel */
|
/* retrieves OSA Express interface information from kernel */
|
||||||
int query_OSA_EXP ( IF_LIST** ,int );
|
unsigned int query_OSA_EXP ( IF_LIST** ,int );
|
||||||
|
|
||||||
/* get time of day */
|
/* get time of day */
|
||||||
int get_time( char* );
|
int get_time( char* );
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ e.g. \-xc0a80a26
|
|||||||
.TP
|
.TP
|
||||||
\fIMASKBITS\fR
|
\fIMASKBITS\fR
|
||||||
Number of bits set in the network mask.
|
Number of bits set in the network mask.
|
||||||
This allows to specify an address range, e.g. 192.168.10.0/24.
|
Network masks can be used to specify address ranges, e.g. 192.168.10.0/24.
|
||||||
This subparameter is only valid for function IPA.
|
This subparameter is only valid for function IPA.
|
||||||
.TP
|
.TP
|
||||||
\fIINTERFACE\fR
|
\fIINTERFACE\fR
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ include ../common.mak
|
|||||||
|
|
||||||
all: qethqoat
|
all: qethqoat
|
||||||
|
|
||||||
qethqoat: qethqoat.o
|
libs = $(rootdir)/libutil/libutil.a
|
||||||
|
|
||||||
|
qethqoat: qethqoat.o $(libs)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
|
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "lib/util_libc.h"
|
||||||
#include "lib/zt_common.h"
|
#include "lib/zt_common.h"
|
||||||
#include "qethqoat.h"
|
#include "qethqoat.h"
|
||||||
|
|
||||||
@@ -46,9 +47,15 @@ static int mac_is_zero(__u8 *mac)
|
|||||||
return !(mac[0] | mac[1] | mac[2] | mac[3] | mac[4] | mac[5]);
|
return !(mac[0] | mac[1] | mac[2] | mac[3] | mac[4] | mac[5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ebctoasc(char *inout, size_t len)
|
static void ebctoasc(char *in, char *out, size_t size)
|
||||||
{
|
{
|
||||||
iconv(l_iconv_ebcdic_ascii, &inout, &len, &inout, &len);
|
size_t size_out = size;
|
||||||
|
size_t size_in = size;
|
||||||
|
size_t rc;
|
||||||
|
|
||||||
|
rc = iconv(l_iconv_ebcdic_ascii, &in, &size_in, &out, &size_out);
|
||||||
|
if (rc == (size_t) -1)
|
||||||
|
fprintf(stderr, "Code page translation EBCDIC-ASCII failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_version()
|
static void print_version()
|
||||||
@@ -208,6 +215,9 @@ static void print_physical(struct qeth_qoat_physical *phdr)
|
|||||||
case OAT_OSA_GEN_OSAE6S:
|
case OAT_OSA_GEN_OSAE6S:
|
||||||
osagen = "OSA-Express6S";
|
osagen = "OSA-Express6S";
|
||||||
break;
|
break;
|
||||||
|
case OAT_OSA_GEN_OSAE7S:
|
||||||
|
osagen = "OSA-Express7S";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
sprintf(tmp, "unknown (0x%x)", phdr->osa_gen);
|
sprintf(tmp, "unknown (0x%x)", phdr->osa_gen);
|
||||||
osagen = tmp;
|
osagen = tmp;
|
||||||
@@ -239,6 +249,9 @@ static void print_physical(struct qeth_qoat_physical *phdr)
|
|||||||
case OAT_PORT_SPEED_10gbs_full:
|
case OAT_PORT_SPEED_10gbs_full:
|
||||||
speed = "10 Gb/s / full duplex";
|
speed = "10 Gb/s / full duplex";
|
||||||
break;
|
break;
|
||||||
|
case OAT_PORT_SPEED_25gbs_full:
|
||||||
|
speed = "25 Gb/s / full duplex";
|
||||||
|
break;
|
||||||
case OAT_PORT_SPEED_UNKNOWN:
|
case OAT_PORT_SPEED_UNKNOWN:
|
||||||
speed = "unknown / unknown";
|
speed = "unknown / unknown";
|
||||||
break;
|
break;
|
||||||
@@ -281,6 +294,7 @@ static void print_logical(struct qeth_qoat_logical *lhdr)
|
|||||||
char prouter[] = "primary";
|
char prouter[] = "primary";
|
||||||
char srouter[] = "secondary";
|
char srouter[] = "secondary";
|
||||||
char nrouter[] = "no";
|
char nrouter[] = "no";
|
||||||
|
char port_name[8];
|
||||||
char *router;
|
char *router;
|
||||||
|
|
||||||
if (lhdr->ip4_primary_router)
|
if (lhdr->ip4_primary_router)
|
||||||
@@ -334,8 +348,8 @@ static void print_logical(struct qeth_qoat_logical *lhdr)
|
|||||||
|
|
||||||
|
|
||||||
if (lhdr->port_name_f) {
|
if (lhdr->port_name_f) {
|
||||||
ebctoasc((char *)lhdr->port_name, 8);
|
ebctoasc((char *)lhdr->port_name, port_name, 8);
|
||||||
printf("Port name: %.8s\n", lhdr->port_name);
|
printf("Port name: %.8s\n", port_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("IPv4 assists enabled: 0x%08x\n", lhdr->ip4_ass_enabled);
|
printf("IPv4 assists enabled: 0x%08x\n", lhdr->ip4_ass_enabled);
|
||||||
@@ -535,6 +549,7 @@ int main(int argc, char **argv)
|
|||||||
opts.raw = 0;
|
opts.raw = 0;
|
||||||
opts.scope = 1;
|
opts.scope = 1;
|
||||||
opts.file = NULL;
|
opts.file = NULL;
|
||||||
|
opts.ifname = NULL;
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, qethqoat_opts_str, qethqoat_opts,
|
while ((c = getopt_long(argc, argv, qethqoat_opts_str, qethqoat_opts,
|
||||||
&index)) != -1) {
|
&index)) != -1) {
|
||||||
@@ -607,7 +622,7 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(ifr.ifr_name, opts.ifname, IFNAMSIZ);
|
util_strlcpy(ifr.ifr_name, opts.ifname, IFNAMSIZ);
|
||||||
oat_data.command = opts.scope;
|
oat_data.command = opts.scope;
|
||||||
ifr.ifr_ifru.ifru_data = (void *)&oat_data;
|
ifr.ifr_ifru.ifru_data = (void *)&oat_data;
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ struct qeth_qoat_physical {
|
|||||||
#define OAT_OSA_GEN_OSAE4S 0x02
|
#define OAT_OSA_GEN_OSAE4S 0x02
|
||||||
#define OAT_OSA_GEN_OSAE5S 0x03
|
#define OAT_OSA_GEN_OSAE5S 0x03
|
||||||
#define OAT_OSA_GEN_OSAE6S 0x04
|
#define OAT_OSA_GEN_OSAE6S 0x04
|
||||||
|
#define OAT_OSA_GEN_OSAE7S 0x05
|
||||||
__u8 osa_gen;
|
__u8 osa_gen;
|
||||||
#define OAT_PORT_SPEED_UNKNOWN 0x00
|
#define OAT_PORT_SPEED_UNKNOWN 0x00
|
||||||
#define OAT_PORT_SPEED_10mbs_half 0x01
|
#define OAT_PORT_SPEED_10mbs_half 0x01
|
||||||
@@ -68,6 +69,7 @@ struct qeth_qoat_physical {
|
|||||||
#define OAT_PORT_SPEED_1000mbs_full 0x06
|
#define OAT_PORT_SPEED_1000mbs_full 0x06
|
||||||
#define OAT_PORT_SPEED_NA 0x07
|
#define OAT_PORT_SPEED_NA 0x07
|
||||||
#define OAT_PORT_SPEED_10gbs_full 0x08
|
#define OAT_PORT_SPEED_10gbs_full 0x08
|
||||||
|
#define OAT_PORT_SPEED_25gbs_full 0x0A
|
||||||
__u8 port_speed;
|
__u8 port_speed;
|
||||||
#define OAT_PORT_MEDIA_COPPER 0x01
|
#define OAT_PORT_MEDIA_COPPER 0x01
|
||||||
#define OAT_PORT_MEDIA_MULTI_MODE 0x02
|
#define OAT_PORT_MEDIA_MULTI_MODE 0x02
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
include ../common.mak
|
include ../common.mak
|
||||||
|
|
||||||
SCRIPTS = dbginfo.sh zfcpdbf scsi_logging_level
|
SCRIPTS = dbginfo.sh zfcpdbf zipl-switch-to-blscfg scsi_logging_level
|
||||||
MAN_PAGES = dbginfo.sh.1 zfcpdbf.1
|
MAN_PAGES = dbginfo.sh.1 zfcpdbf.1 zipl-switch-to-blscfg.1
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# dbginfo.sh - Tool to collect runtime, configuration, and trace information
|
# dbginfo.sh - Tool to collect runtime, configuration, and trace information
|
||||||
#
|
#
|
||||||
# Copyright IBM Corp. 2002, 2017
|
# Copyright IBM Corp. 2002, 2018
|
||||||
#
|
#
|
||||||
# s390-tools is free software; you can redistribute it and/or modify
|
# s390-tools is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the MIT license. See LICENSE for details.
|
# it under the terms of the MIT license. See LICENSE for details.
|
||||||
@@ -21,7 +21,7 @@ readonly SCRIPTNAME="${0##*/}"
|
|||||||
print_version() {
|
print_version() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
${SCRIPTNAME}: Debug information script version %S390_TOOLS_VERSION%
|
${SCRIPTNAME}: Debug information script version %S390_TOOLS_VERSION%
|
||||||
Copyright IBM Corp. 2002, 2017
|
Copyright IBM Corp. 2002, 2018
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +167,9 @@ readonly OUTPUT_FILE_VMCMD="${WORKPATH}zvm_runtime.out"
|
|||||||
# File that includes content of files from sysfs
|
# File that includes content of files from sysfs
|
||||||
readonly OUTPUT_FILE_SYSFS="${WORKPATH}sysfsfiles.out"
|
readonly OUTPUT_FILE_SYSFS="${WORKPATH}sysfsfiles.out"
|
||||||
|
|
||||||
|
# File that includes the output of lsof
|
||||||
|
readonly OUTPUT_FILE_LSOF="${WORKPATH}open_files.out"
|
||||||
|
|
||||||
# File that includes content of OSA OAT
|
# File that includes content of OSA OAT
|
||||||
readonly OUTPUT_FILE_OSAOAT="${WORKPATH}osa_oat"
|
readonly OUTPUT_FILE_OSAOAT="${WORKPATH}osa_oat"
|
||||||
|
|
||||||
@@ -182,11 +185,14 @@ readonly OUTPUT_FILE_XML="${WORKPATH}domain_xml"
|
|||||||
# File that includes the docker inspect output
|
# File that includes the docker inspect output
|
||||||
readonly OUTPUT_FILE_DOCKER="${WORKPATH}docker_inspect.out"
|
readonly OUTPUT_FILE_DOCKER="${WORKPATH}docker_inspect.out"
|
||||||
|
|
||||||
|
# File that includes nvme related information
|
||||||
|
readonly OUTPUT_FILE_NVME="${WORKPATH}nvme.out"
|
||||||
|
|
||||||
# Mount point of the debug file system
|
# Mount point of the debug file system
|
||||||
readonly MOUNT_POINT_DEBUGFS="/sys/kernel/debug"
|
readonly MOUNT_POINT_DEBUGFS="/sys/kernel/debug"
|
||||||
|
|
||||||
# The amount of steps running the whole collections
|
# The amount of steps running the whole collections
|
||||||
readonly COLLECTION_COUNT=11
|
readonly COLLECTION_COUNT=12
|
||||||
|
|
||||||
# The kernel version (e.g. '2' from 2.6.32 or '3' from 3.2.1)
|
# The kernel version (e.g. '2' from 2.6.32 or '3' from 3.2.1)
|
||||||
readonly KERNEL_VERSION=$(uname -r 2>/dev/null | cut -d'.' -f1)
|
readonly KERNEL_VERSION=$(uname -r 2>/dev/null | cut -d'.' -f1)
|
||||||
@@ -304,12 +310,13 @@ LOGFILES="\
|
|||||||
/var/log/lin_tape.trace\
|
/var/log/lin_tape.trace\
|
||||||
/var/log/lin_tape.errorlog\
|
/var/log/lin_tape.errorlog\
|
||||||
/var/log/messages*\
|
/var/log/messages*\
|
||||||
|
/var/log/opencryptoki\
|
||||||
/var/log/syslog*\
|
/var/log/syslog*\
|
||||||
/var/log/sa\
|
/var/log/sa\
|
||||||
/var/log/yum.log\
|
/var/log/yum.log\
|
||||||
/var/log/openvswitch/ovs-vswitchd.log\
|
/var/log/openvswitch/ovs-vswitchd.log\
|
||||||
/var/log/openvswitch/ovsdb-server.log\
|
/var/log/openvswitch/ovsdb-server.log\
|
||||||
/var/run/docker/libcontainerd/containerd/events.log\
|
/run/docker/libcontainerd/containerd/events.log\
|
||||||
/run/containerd/events.log\
|
/run/containerd/events.log\
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -438,7 +445,8 @@ CMDS="uname -a\
|
|||||||
:SPident\
|
:SPident\
|
||||||
:rpm -qa | sort\
|
:rpm -qa | sort\
|
||||||
:sysctl -a\
|
:sysctl -a\
|
||||||
:lsof\
|
:lsof \
|
||||||
|
> '${OUTPUT_FILE_LSOF}'\
|
||||||
:mount\
|
:mount\
|
||||||
:df -h\
|
:df -h\
|
||||||
:df -i\
|
:df -i\
|
||||||
@@ -471,10 +479,13 @@ VM_CMDS="q userid\
|
|||||||
:q privclass\
|
:q privclass\
|
||||||
:q cplevel\
|
:q cplevel\
|
||||||
:q cpservice\
|
:q cpservice\
|
||||||
|
:q cpprot user\
|
||||||
|
:q specex\
|
||||||
:q ssi\
|
:q ssi\
|
||||||
:q cpus\
|
:q cpus\
|
||||||
:q srm\
|
:q srm\
|
||||||
:q vtod\
|
:q vtod\
|
||||||
|
:q time full\
|
||||||
:q timezone\
|
:q timezone\
|
||||||
:q loaddev\
|
:q loaddev\
|
||||||
:q v osa\
|
:q v osa\
|
||||||
@@ -826,6 +837,25 @@ collect_docker() {
|
|||||||
pr_log_stdout " "
|
pr_log_stdout " "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################################
|
||||||
|
collect_nvme() {
|
||||||
|
local NVME
|
||||||
|
|
||||||
|
pr_syslog_stdout "11 of ${COLLECTION_COUNT}: Collecting nvme output"
|
||||||
|
call_run_command "nvme list" "${OUTPUT_FILE_NVME}"
|
||||||
|
|
||||||
|
for NVME in /dev/nvme[0-9]*; do
|
||||||
|
if [ -c $NVME ]; then
|
||||||
|
call_run_command "smartctl -x $NVME" "${OUTPUT_FILE_NVME}"
|
||||||
|
call_run_command "nvme fw-log $NVME" "${OUTPUT_FILE_NVME}"
|
||||||
|
call_run_command "nvme smart-log $NVME" "${OUTPUT_FILE_NVME}"
|
||||||
|
call_run_command "nvme error-log $NVME" "${OUTPUT_FILE_NVME}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
pr_log_stdout " "
|
||||||
|
}
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
post_processing() {
|
post_processing() {
|
||||||
local file_mtime
|
local file_mtime
|
||||||
@@ -833,7 +863,7 @@ post_processing() {
|
|||||||
local tmp_file
|
local tmp_file
|
||||||
local file_name
|
local file_name
|
||||||
|
|
||||||
pr_syslog_stdout "11 of ${COLLECTION_COUNT}: Postprocessing"
|
pr_syslog_stdout "${COLLECTION_COUNT} of ${COLLECTION_COUNT}: Postprocessing"
|
||||||
|
|
||||||
find "${WORKPATH}etc/libvirt/qemu/" -maxdepth 1 -name "*.xml" 2>/dev/null | while IFS= read -r file_name; do
|
find "${WORKPATH}etc/libvirt/qemu/" -maxdepth 1 -name "*.xml" 2>/dev/null | while IFS= read -r file_name; do
|
||||||
file_mtime_epoche=$(stat --format=%Y "${file_name}")
|
file_mtime_epoche=$(stat --format=%Y "${file_name}")
|
||||||
@@ -992,25 +1022,31 @@ environment_setup()
|
|||||||
# create gzip-ped tar file
|
# create gzip-ped tar file
|
||||||
create_package()
|
create_package()
|
||||||
{
|
{
|
||||||
|
local rc_tar
|
||||||
pr_stdout "Finalizing: Creating archive with collected data"
|
pr_stdout "Finalizing: Creating archive with collected data"
|
||||||
cd "${WORKDIR_BASE}"
|
cd "${WORKDIR_BASE}"
|
||||||
|
|
||||||
if ! tar -czf "${WORKARCHIVE}" "${WORKDIR_CURRENT}"; then
|
tar -czf "${WORKARCHIVE}" "${WORKDIR_CURRENT}"
|
||||||
pr_stdout " "
|
rc_tar=$?
|
||||||
pr_stdout "${SCRIPTNAME}: Error: Collection of data failed!"
|
if [ $rc_tar -eq 0 ]; then
|
||||||
pr_stdout " The creation of \"${WORKARCHIVE}\" was not successful."
|
chmod 0600 "${WORKARCHIVE}"
|
||||||
pr_stdout " Please check the directory \"${WORKDIR_BASE}\""
|
pr_stdout " "
|
||||||
pr_stdout " to provide enough free available space."
|
pr_stdout "Collected data was saved to:"
|
||||||
|
pr_stdout " >> ${WORKARCHIVE} <<"
|
||||||
|
pr_stdout " "
|
||||||
|
pr_stdout "Review the collected data before sending to your service organization. "
|
||||||
|
pr_stdout " "
|
||||||
|
elif [ $rc_tar -eq 127 ]; then
|
||||||
|
pr_stdout " "
|
||||||
|
pr_stdout "${SCRIPTNAME}: Error: tar command is not available!"
|
||||||
|
pr_stdout " Please install the corresponding package!"
|
||||||
else
|
else
|
||||||
chmod 0600 "${WORKARCHIVE}"
|
pr_stdout " "
|
||||||
pr_stdout " "
|
pr_stdout "${SCRIPTNAME}: Error: Collection of data failed!"
|
||||||
pr_stdout "Collected data was saved to:"
|
pr_stdout " The creation of \"${WORKARCHIVE}\" was not successful."
|
||||||
pr_stdout " >> ${WORKARCHIVE} <<"
|
pr_stdout " Please check the directory \"${WORKDIR_BASE}\""
|
||||||
|
pr_stdout " to provide enough free available space."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pr_stdout " "
|
|
||||||
pr_stdout "Review the collected data before sending to your service organization. "
|
|
||||||
pr_stdout " "
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1118,6 +1154,8 @@ collect_domain_xml
|
|||||||
|
|
||||||
collect_docker
|
collect_docker
|
||||||
|
|
||||||
|
collect_nvme
|
||||||
|
|
||||||
post_processing
|
post_processing
|
||||||
|
|
||||||
create_package
|
create_package
|
||||||
|
|||||||
214
scripts/zipl-switch-to-blscfg
Executable file
214
scripts/zipl-switch-to-blscfg
Executable file
@@ -0,0 +1,214 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# zipl-switch-to-blscfg - Switch zipl to use BootLoaderSpec configuration
|
||||||
|
#
|
||||||
|
# Copyright 2018 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# s390-tools is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
#
|
||||||
|
|
||||||
|
readonly SCRIPTNAME="${0##*/}"
|
||||||
|
|
||||||
|
declare -A zipl_to_bls
|
||||||
|
zipl_to_bls["image"]="linux"
|
||||||
|
zipl_to_bls["ramdisk"]="initrd"
|
||||||
|
zipl_to_bls["parameters"]="options"
|
||||||
|
|
||||||
|
print_error() {
|
||||||
|
echo "$1" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function on_exit() {
|
||||||
|
if ! rm -rf $TMP; then
|
||||||
|
echo "Delete temporary files failed!" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! TMP="$(mktemp -d)"; then
|
||||||
|
print_error "Creating a temporary dir for config files failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap 'on_exit' EXIT
|
||||||
|
|
||||||
|
print_version() {
|
||||||
|
cat <<EOF
|
||||||
|
${SCRIPTNAME}: version %S390_TOOLS_VERSION%
|
||||||
|
Copyright Red Hat, Inc. 2018
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
print_usage()
|
||||||
|
{
|
||||||
|
print_version
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Usage: ${SCRIPTNAME} [OPTIONS]
|
||||||
|
|
||||||
|
Switches the zipl boot-loader configuration to use BootLoaderSpec files.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
-h, --help print this help and exit
|
||||||
|
-v, --version print version information and exit
|
||||||
|
--backup-suffix=SUFFIX suffix used for backup files, defaults to .bak
|
||||||
|
--bls-directory=DIR path to generate BLS files, defaults to /boot/loader/entries
|
||||||
|
--config-file=FILE path to zipl configuration file, defaults to /etc/zipl.conf
|
||||||
|
--ignore-default ignore the default option from the zipl configuration file
|
||||||
|
--use-version-name use the section kernel version as the BLS file name
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
OPTS="$(getopt -o hv --long help,version,backup-suffix:,bls-directory:,config-file:,\
|
||||||
|
ignore-default,use-version-name -n \'$SCRIPTNAME\' -- "$@")"
|
||||||
|
eval set -- "$OPTS"
|
||||||
|
|
||||||
|
BACKUP_SUFFIX=.bak
|
||||||
|
BLS_DIR="/boot/loader/entries"
|
||||||
|
CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg"
|
||||||
|
LINUX_DEBUG_VERSION_POSTFIX="_with_debugging"
|
||||||
|
LINUX_DEBUG_TITLE_POSTFIX=" with debugging"
|
||||||
|
CONFIG="/etc/zipl.conf"
|
||||||
|
|
||||||
|
while [ ${#} -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--help|-h)
|
||||||
|
print_usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--version|-v)
|
||||||
|
print_version
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--backup-suffix)
|
||||||
|
BACKUP_SUFFIX=${2}
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--bls-directory)
|
||||||
|
BLS_DIR=${2}
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--config-file)
|
||||||
|
CONFIG=${2}
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--ignore-default)
|
||||||
|
ignore_default=true
|
||||||
|
;;
|
||||||
|
--use-version-name)
|
||||||
|
version_name=true
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo >&2
|
||||||
|
echo "${SCRIPTNAME}: invalid option \"${1}\"" >&2
|
||||||
|
echo "Try '${SCRIPTNAME} --help' for more information" >&2
|
||||||
|
echo >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
TMP_CONFIG="${TMP}/${CONFIG##*/}"
|
||||||
|
|
||||||
|
[[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
|
||||||
|
|
||||||
|
if [ -f /etc/machine-id ]; then
|
||||||
|
read MACHINE_ID < /etc/machine-id
|
||||||
|
MACHINE_ID=${MACHINE_ID}-
|
||||||
|
fi
|
||||||
|
|
||||||
|
count=0
|
||||||
|
OUTPUT=""
|
||||||
|
TARGET=""
|
||||||
|
while IFS='= ' read key val; do
|
||||||
|
# for BLS the default kernel is always the latest one
|
||||||
|
if [[ $key == \#* ]] || [[ $key == "default" && $ignore_default == true ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove spaces
|
||||||
|
key="$(echo $key | sed -e 's/^[ \t"]*//;s/[ \t"]*$//')"
|
||||||
|
|
||||||
|
if [[ $key = \[*] ]]; then
|
||||||
|
if [[ $key == "[defaultboot]" ]]; then
|
||||||
|
OUTPUT=${TMP_CONFIG}
|
||||||
|
echo $key >> ${OUTPUT}
|
||||||
|
else
|
||||||
|
key="${key%\]}"
|
||||||
|
key="${key#\[}"
|
||||||
|
section=$key
|
||||||
|
OUTPUT=${BLS_DIR}/${MACHINE_ID}${section}.conf
|
||||||
|
if [ -f "${OUTPUT}" ]; then
|
||||||
|
print_error "BLS file ${OUTPUT} already exists"
|
||||||
|
fi
|
||||||
|
echo "title $section" >> ${OUTPUT}
|
||||||
|
fi
|
||||||
|
elif [[ $val ]]; then
|
||||||
|
val="$(echo $val | sed -e 's/^[ \t"]*//;s/[ \t"]*$//')"
|
||||||
|
if [[ $key == "target" ]]; then
|
||||||
|
if [ -z ${TARGET} ]; then
|
||||||
|
echo $key=$val >> ${TMP_CONFIG}
|
||||||
|
TARGET=$val
|
||||||
|
else if [ "${TARGET}" != "${val}" ]; then
|
||||||
|
print_error "BLS is only supported if all sections have the same target"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -n "${zipl_to_bls[$key]}" ]; then
|
||||||
|
if [[ $key = "image" && $version_name == true ]]; then
|
||||||
|
if [[ $val = *"vmlinuz-"* ]]; then
|
||||||
|
version="${val##*/vmlinuz-}"
|
||||||
|
else
|
||||||
|
version="${val##*/}"
|
||||||
|
fi
|
||||||
|
echo "version $version" >> ${OUTPUT}
|
||||||
|
if [[ $version = *"rescue"* ]]; then
|
||||||
|
FILENAME=${BLS_DIR}/${MACHINE_ID}0-rescue.conf
|
||||||
|
else
|
||||||
|
FILENAME=${BLS_DIR}/${MACHINE_ID}${version}.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${OUTPUT} != ${FILENAME} ]]; then
|
||||||
|
if [ -f "${FILENAME}" ]; then
|
||||||
|
print_error "BLS file ${FILENAME} already exists"
|
||||||
|
fi
|
||||||
|
mv ${OUTPUT} ${FILENAME}
|
||||||
|
if [ ! $? -eq 0 ]; then
|
||||||
|
print_error "Creating BLS file ${FILENAME} failed"
|
||||||
|
fi
|
||||||
|
OUTPUT=${FILENAME}
|
||||||
|
fi
|
||||||
|
elif [[ $key = "image" ]]; then
|
||||||
|
echo "version $section" >> ${OUTPUT}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${zipl_to_bls[$key]} ${val}" >> ${OUTPUT}
|
||||||
|
else
|
||||||
|
echo $key=$val >> ${TMP_CONFIG}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < "${CONFIG}"
|
||||||
|
|
||||||
|
if [ -f "${CONFIG}${BACKUP_SUFFIX}" ]; then
|
||||||
|
print_error "Backup file ${CONFIG}${BACKUP_SUFFIX} already exists"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -af "${CONFIG}" "${CONFIG}${BACKUP_SUFFIX}"
|
||||||
|
mv "${TMP_CONFIG}" "${CONFIG}"
|
||||||
|
|
||||||
|
zipl > /dev/null
|
||||||
|
if [ ! $? -eq 0 ]; then
|
||||||
|
mv "${CONFIG}${BACKUP_SUFFIX}" "${CONFIG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
45
scripts/zipl-switch-to-blscfg.1
Normal file
45
scripts/zipl-switch-to-blscfg.1
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
.TH ZIPL-SWITCH-TO-BLSCFG 1 "April 2018" "s390-tools"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
zipl-switch-to-blscfg \- Switch zipl to use BootLoaderSpec configuration
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.br
|
||||||
|
\fBzipl-switch-to-blscfg\fP [OPTIONS]
|
||||||
|
.br
|
||||||
|
\fBzipl-switch-to-blscfg\fP {\-h|\-v}
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
This script switches the zipl boot-loader configuration to use BootLoaderSpec files
|
||||||
|
to define IPL sections. For each Linux kernel defined in the zipl.conf config file,
|
||||||
|
a BLS fragment is generated in the BLS directory specified. Also, the zipl.conf is
|
||||||
|
modified it only contains global configurations, all IPL sections comes from BLS.
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
\fB\-h\fP, \fB\-\-help\fP
|
||||||
|
Print this help and exit
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-v\fP, \fB\-\-version\fP
|
||||||
|
Print version information and exit
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-\-backup-suffix <SUFFIX>\fP
|
||||||
|
The suffix used for backup files, defaults to .bak.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-\-bls-directory <DIRECTORY>\fP
|
||||||
|
The DIRECTORY where the BLS fragments will be generated. The directory is created if it doesn't exists, by default /boot/loader/entries is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-\-config-file <FILE>\fP
|
||||||
|
The FILE used for zipl configuration file, defaults to /etc/zipl.conf.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-\-ignore-default\fP
|
||||||
|
Ignore the default option from the zipl configuration file
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fB\-\-use-version-name\fP
|
||||||
|
Use the section kernel version as the BLS file name
|
||||||
@@ -10,11 +10,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=CPACF statistics collection daemon process for Linux on System z
|
Description=CPACF statistics collection daemon process for Linux on System z
|
||||||
Documentation=man:cpacfstatsd(8)
|
Documentation=man:cpacfstatsd(8)
|
||||||
|
ConditionVirtualization=no
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=@usrsbin_path@/cpacfstatsd
|
ExecStart=@usrsbin_path@/cpacfstatsd
|
||||||
PIDFile=/var/run/cpacfstatsd.pid
|
PIDFile=/run/cpacfstatsd.pid
|
||||||
KillMode=process
|
KillMode=process
|
||||||
Restart=no
|
Restart=no
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user