probe 命令

目录

  1. 简介
  2. 命令格式
  3. 子命令
  4. 示例
  5. 版本历史
  6. 相关命令

简介

probe 命令用于管理探针运行watchtracemonitortop 等观测命令在执行时会在 target 内注册 probe,probe 命令是这些 probe 的统一控制入口:查看注册情况、检查最近事件、停止运行中的 probe 并清理旧 probe。

通过 liststatusinspectstopcleanup 子命令可以按 target、类型(watchtrace 等)或状态过滤 probe,及时回收忘记关闭的观测,避免对 target 造成持续开销。

命令格式

peeka-cli probe <subcommand> [options]

子命令

子命令 说明
list 列出 probe run
status --probe <id> 查看 probe 状态
inspect --probe <id> 查看 probe 详情和最近事件
stop --probe <id> 停止运行中的 probe
cleanup 清理旧 probe

常用选项:

参数 说明
--target <id> 按拥有 probe 的 target 过滤或定位
--type <type> list 时按 probe 类型过滤,如 watchtrace
--status <status> list 时按状态过滤
--events <n> inspect 返回最近事件数量,默认 100
--all cleanup 时也清理 created/paused probe;不会清理 active probe
--older-than <duration> cleanup 时清理早于指定时间的 probe,默认 10m
--format table/json 输出格式,默认 table

示例

peeka-cli probe list --target target_abcd1234
peeka-cli probe list --type watch --status active
peeka-cli probe inspect --probe probe_123 --events 20 --format json
peeka-cli probe stop --probe probe_123
peeka-cli probe cleanup --older-than 1h

版本历史

版本 发布日期 变更说明
0.1.16 2026-06-07 新增 probe 命令组

相关命令

  • watch - 创建函数观测
  • trace - 创建调用链追踪
  • job - 管理命令任务

回到顶部

Copyright © 2026 Peeka contributors. Distributed under the Apache License 2.0.

This site uses Just the Docs, a documentation theme for Jekyll.