biotype: block I/O type tool suggestion
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
It may be nice to have a tool that could dump all kernel info on block I/O in a human readable way: see include/linux/blk_types.h and the requests and operations (REQ_\*). There's a lot of interesting flags that may be set, that aren't exposed in existing tools. Note that the behavior of these flags changed in 4.9 (introduction of REQ_OP_\*, and the req_op enum), so a minimum for this tool would be to just support 4.9+.
Also see tools/capable.py, as one way of bringing in header definitions into a bcc tool:
```Python
# capabilities to names, generated from (and will need updating):
# awk '/^#define.CAP_.*[0-9]$/ { print " " $3 ": \"" $2 "\"," }' \
# include/uapi/linux/capability.h
capabilities = {
0: "CAP_CHOWN",
1: "CAP_DAC_OVERRIDE",
2: "CAP_DAC_READ_SEARCH",
3: "CAP_FOWNER",
4: "CAP_FSETID",
5: "CAP_KILL",
6: "CAP_SETGID",
7: "CAP_SETUID",
8: "CAP_SETPCAP",
9: "CAP_LINUX_IMMUTABLE",
[...]
```
Obviously this maps numbers to human readable strings. Less obvious might be that this is generated by the awk command in the comment above: making it easy to regenerate and update the script.
Maybe there's an even better way to do this? If bcc requires linux-headers (does it?), then perhaps it can auto generate these on the fly.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with include/linux/blk_types.h and the REQ_* definitions, then review tools/capable.py for its generated header mapping approach. Define a Linux 4.9+ bcc tool that dumps block I/O kernel information and presents request operations and flags as human-readable names; completion should include a maintainable way to update those mappings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python
- Domain
- cli, observability-sre, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100