-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-378768: capture block schedulers #4
Conversation
8ea204b
to
5338de0
Compare
xen-bugtool
Outdated
@@ -765,6 +769,7 @@ exclude those logs from the archive. | |||
cmd_output(CAP_DISK_INFO, [SG_MAP, '-x']) | |||
func_output(CAP_DISK_INFO, 'scsi-hosts', dump_scsi_hosts) | |||
cmd_output(CAP_DISK_INFO, [LVDISPLAY, '--map']) | |||
cmd_output(CAP_BLOCK_SCHEDULER, [LSBLK, '-o', 'SCHED,NAME']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example to get more information in the same call:
lsblk -io type,name,sched,tran,rota,log-sec,rq-size,vendor,model,serial
TYPE NAME SCHED TRAN ROTA LOG-SEC RQ-SIZE VENDOR MODEL SERIAL
disk sda cfq sata 1 512 128 ATA ST1000NX0423 W470MWXE
part |-sda4 cfq 1 512 128
part |-sda2 cfq 1 512 128
part |-sda5 cfq 1 512 128
part |-sda3 cfq 1 512 128
lvm | `-VG_XenStorage--03086bb3--efa1--a74e--fbc5--16077bf518e7-MGT 1 512 128
part |-sda1 cfq 1 512 128
part `-sda6 cfq 1 512 128
As in this example, I'd also add -i
to use ASCII characters for the tree formatting as otherwise lsblk
would use Unicode characters to format the tree if it runs inside a UTF-8 locale (like when running it from the shell) but ASCII format if running it from some XAPI plugin (in which the en_US.UTF-8
default locale of XenServer) is not set. So for a clean and more-stable ASCII output, I'd recommend adding it.
Because ,
are used in the arguments, they would be carried over into the generated filename by cmd_output
, so it would be good to add label="lsblk"
to cmd_output()
, to get a file like bug-report-20230622161233/lsblk.out
.
If that's not done, a file like
bug-report-20230622161233/lsblk-osched,name.out
would be created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with using /sys/class/block/*/queue/scheduler
and this has a number of problems
- picks up all kernel block devices, including the tdX devices for the live, active VBDs attached to VM. Where there may be many hundred of these. Filtering to just
sd*
anddm-*
would be possible but potentially risks missing something that could be important in triaging a customer issue. - The output results in one file in the bugtool for each entry in
/sys/class/block/*/queue
which results in a lot of files to deal with when triaging the logs whereaslsblk
gives the result in one single file. - Due to the implementation of sysfs the stat call for reading the size of the logs will always report 4KB so you very rapidly (and erroneously) exceed the size limit for the capability, or the size limit has to be set artificially high.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mg12 Do you have a preference for just the file or a more complete set of values from lsblk
, and would you need additional values from lsblk
? (lsblk -h
has a list)
As described in my review comment for the new cmd_output
call, think this would be good:
- Use
-i
or--ascii
to not get Unicode tree formatting in the data - Add
label=lsblk-sched"
tocmd_output
(or so) not get ",
" in the archived file name - To retrieve more info, not just the scheduler, what about this proposal:
lsblk -io type,name,sched,tran,rota,log-sec,rq-size,vendor,model,serial
For performance testing purposes we need the scheduler, and 'rotational' is also useful (e.g. if 'cfq' is used and it has wrongly determined that an SSD is rotational because it is hidden behind too many layers of PERC controllers, etc.). I wouldn't mind getting the rest of the fields you suggested, except for 'serial' which might have some privacy implications and we don't really need it, so best not to explicitly capture it. 'vendor/model' can be useful to determine which drive got assigned which letter, so that is probably fine. |
@MarkSymsCtx: what @edwintorok suggested above looks good to me, essentially @bernhardkaindl's parameters minus serial: |
d6faeca
to
dac7637
Compare
Signed-off-by: Mark Syms <mark.syms@citrix.com>
6562c14
dac7637
to
6562c14
Compare
No description provided.