Skip to content

Commit 2c70beb

Browse files
committed
Add a flow view of the osd, pg, and object
The trace lines already carried the mapping and the parser threw it away. A radostrace line names the object, its placement group, and the acting set, so the panel opened with m shows all three levels without a new remote command. osdtrace names no object, so a run with only that source collapses to two levels and the panel title says which one it reached. o orders every branch by op count or by latency and s reverses it. Rows carry the mean size the op declared, which separates a slow heavy request from one that is slow for the little it asks for. A read reports the length it requested rather than the bytes returned. Two keys behaved oddly once the panel existed. r and t switched the trace source before starting it, which in a view with no selected source looked like a key that did nothing, and x cleared osdtrace alone while the panel drew from every source. Signed-off-by: Seyeong Kim <me@seyeong.kim>
1 parent e8f1ebe commit 2c70beb

8 files changed

Lines changed: 847 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Notable changes are documented here. The format follows
88

99
### Added
1010

11+
- Added a flow view, opened with `m`, that shows the OSD, placement group, and
12+
object behind the ops in the trace buffer. radostrace lines already name all
13+
three, so the view needs no extra remote command; with only osdtrace running
14+
it collapses to OSD and placement group. `o` orders it by op count or by
15+
latency and `s` reverses the order. Each row also carries the mean op size,
16+
which separates a slow heavy request from one that is slow for the little it
17+
asks for. A read reports the length it requested rather than bytes returned,
18+
so a client that always asks for 4MiB reports 4MiB whatever the object holds.
1119
- Insights now name the checks behind a `HEALTH_WARN` or `HEALTH_ERR` instead of
1220
telling the operator to go run `ceph health detail`. `ceph -s` already carried
1321
them, so this costs no extra remote command.
@@ -20,6 +28,7 @@ Notable changes are documented here. The format follows
2028

2129
### Fixed
2230

31+
- `x` now clears every captured trace source rather than osdtrace alone.
2332
- Node readiness no longer breaks on hosts without `ceph-osd` processes. The
2433
remote OSD count fell back through `pgrep -c ... || echo 0`, which emitted two
2534
lines because `pgrep -c` prints `0` and exits 1 on no match. The extra line

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ In a source clone, use `cargo run -- init-config`, edit the generated file, then
5555
- Per-OSD commit and apply latency from `ceph osd perf` next to the eBPF trace
5656
numbers, and health check names read straight out of `ceph -s`.
5757
- osdtrace eBPF latency tracing with per-OSD and per-PG breakdown of queue, BlueStore, and KV-commit latency.
58+
- A flow view of the OSD, placement group, and object behind the observed
59+
ops, built from the trace lines already streaming. radostrace names the
60+
object so the view has three levels; with only osdtrace it collapses to
61+
OSD and placement group. Rows carry the mean op size next to the latency; a
62+
read reports the length it requested, not the bytes returned.
5863
- No standing agent: no permanent daemon on the nodes; the osdtrace runner script removes itself on stop, quit, or TTL expiry. (The cephtrace tracer binaries you deploy do persist under `~/.cephlens/bin/`.)
5964
- Edit hosts and trace settings live in the TUI; changes apply to open SSH streams immediately.
6065
- Export recorded sessions as Markdown reports with the same diagnostic rules used by the TUI.
@@ -286,6 +291,9 @@ p run a probe readiness check
286291
c edit config
287292
t/f/r view osdtrace / kfstrace / radostrace; press again to start or stop (confirmed)
288293
a start or stop all trace sources (confirmed)
294+
m flow view: the osd -> pg -> object mapping behind the live ops
295+
o flow view: order by op count or by latency
296+
s flow view: reverse the order
289297
i install osdtrace
290298
x clear captured trace events
291299
? toggle the help overlay

src/app.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use serde_json::Value;
1919
use crate::{
2020
collect::{parse_cluster_summary, parse_osds, run_probe},
2121
editor::ConfigEditor,
22+
flow::{FlowMetric, FlowSort},
2223
kfstrace::{KfsEvent, parse_kfs_event},
2324
model::{NodeSummary, Snapshot},
2425
radostrace::{RadosEvent, parse_rados_event},
@@ -177,6 +178,10 @@ pub(crate) struct App {
177178
pub(crate) trace_following: bool,
178179
pub(crate) trace_session: Option<String>,
179180
pub(crate) trace_source: TraceSource,
181+
pub(crate) flow_view: bool,
182+
pub(crate) flow_metric: FlowMetric,
183+
pub(crate) flow_sort: FlowSort,
184+
pub(crate) flow_scroll: usize,
180185
pub(crate) kfstrace_events: Vec<KfsEvent>,
181186
pub(crate) kfstrace_active: usize,
182187
pub(crate) kfstrace_stop: Arc<AtomicBool>,

0 commit comments

Comments
 (0)