Skip to content

Want vsock packet dtrace probes#1100

Open
papertigers wants to merge 1 commit intomasterfrom
spr/papertigers/want-vsock-packet-dtrace-probes
Open

Want vsock packet dtrace probes#1100
papertigers wants to merge 1 commit intomasterfrom
spr/papertigers/want-vsock-packet-dtrace-probes

Conversation

@papertigers
Copy link
Copy Markdown
Contributor

@papertigers papertigers commented Apr 2, 2026

We want the ability to trace packet flows from guest<-->host.

❯ pfexec dtrace -Zqn 'propolis*:::vsock_pkt_* {printf("%s\n\n", json(copyinstr(arg0), "ok"));}'  | jq
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 0,
  "socket_type": "Stream",
  "op": "Request",
  "flags": "",
  "buf_alloc": 262144,
  "fwd_cnt": 0
}
{
  "src_cid": 2,
  "dst_cid": 16,
  "src_port": 2222,
  "dst_port": 3308370434,
  "len": 0,
  "socket_type": "Stream",
  "op": "Response",
  "flags": "",
  "buf_alloc": 131072,
  "fwd_cnt": 0
}
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 22,
  "socket_type": "Stream",
  "op": "ReadWrite",
  "flags": "",
  "buf_alloc": 262144,
  "fwd_cnt": 0
}
{
  "src_cid": 2,
  "dst_cid": 16,
  "src_port": 2222,
  "dst_port": 3308370434,
  "len": 22,
  "socket_type": "Stream",
  "op": "ReadWrite",
  "flags": "",
  "buf_alloc": 131072,
  "fwd_cnt": 22
}
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 0,
  "socket_type": "Stream",
  "op": "CreditUpdate",
  "flags": "",
  "buf_alloc": 262144,
  "fwd_cnt": 22
}
..... snip ......
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 96,
  "socket_type": "Stream",
  "op": "ReadWrite",
  "flags": "",
  "buf_alloc": 262144,
  "fwd_cnt": 5278
}
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 0,
  "socket_type": "Stream",
  "op": "Shutdown",
  "flags": "VIRTIO_VSOCK_SHUTDOWN_F_SEND",
  "buf_alloc": 262144,
  "fwd_cnt": 5278
}
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 0,
  "socket_type": "Stream",
  "op": "Shutdown",
  "flags": "VIRTIO_VSOCK_SHUTDOWN_F_RECEIVE | VIRTIO_VSOCK_SHUTDOWN_F_SEND",
  "buf_alloc": 262144,
  "fwd_cnt": 5278
}
{
  "src_cid": 2,
  "dst_cid": 16,
  "src_port": 2222,
  "dst_port": 3308370434,
  "len": 0,
  "socket_type": "Stream",
  "op": "Reset",
  "flags": "",
  "buf_alloc": 131072,
  "fwd_cnt": 0
}
{
  "src_cid": 16,
  "dst_cid": 2,
  "src_port": 3308370434,
  "dst_port": 2222,
  "len": 0,
  "socket_type": "Stream",
  "op": "Reset",
  "flags": "",
  "buf_alloc": 262144,
  "fwd_cnt": 5278
}

Created using jj-spr 0.1.0
@papertigers papertigers requested a review from iximeow April 2, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant