ON THIS PAGE

  • CLI
  • 常规命令
  • 云端指令
  • 设备指令
  • App指令

CLI

OAK Hub Agent 带有一个命令行界面 (CLI) 允许您与代理及其连接的设备进行交互和管理. 这个部分介绍CLI的用法和可用命令.使用CLI时, 打开你的终端并执行以下指令:
Command Line
1hubctl [command] [options]
替换 [command] 为下面描述的可用命令之一, 替换 [options] 为任何适用的特定命令的选项.

常规命令

version - 打印OAK Hub Agent的版本.例:
Command Line
1$ hubctl version
2Installed agent version: 24.55.1308
status - 打印OAK Hub Agent 的状态.例:
Command Line
1$ hubctl status
2╔═══════════════════════════════════════════════════════════════╗
3║                                                               ║
4║ Luxonis Hub Agent (24.55.1308 | linux/arm64 | DepthAI 2.21.2)5║                                                               ║
6╚═══════════════════════════════════════════════════════════════╝
7
8Web UI                   https://localhost:9010
9DepthAI                  2.21.2
10
11Connected to cloud?      yes (https://hub.luxonis.com)
12Team                     Luxonis
13Pending detections       0
14
15
16Link to robot in cloud
17https://hub.luxonis.com/robots/00000000-0000-0000-0000-000000000000
start - 打开OAK Hub Agent.
Requires root privileges
例:
Command Line
1$ sudo hubctl start
stop - 停止OAK Hub Agent.
Requires root privileges
例:
Command Line
1$ sudo hubctl stop
restart - 重启OAK Hub Agent.
Requires root privileges
例:
Command Line
1$ sudo hubctl restart
startup - Enables or disables automatic launch of the Luxonis Hub Agent on startup.Arguments:
  • enable enables automatic launch
  • disable disables automatic launch
例:
Command Line
1$ hubctl startup enable
logs - 显示OAK Hub Agent的日志.选项:
  • -f, --follow do not terminate, keep following the logs (default: false)
  • -a, --all prints all available logs (consider piping to less) (default: false)
  • -l, --last <lines> how many lines (from the end to print) (default: "20")
  • --since <linux date> filter since
  • --until <linux date> filter until
  • --format <json|pretty|plain> choose format of logs (default: "pretty")
例:
Command Line
1$ hubctl logs
263 23:05:28  I  user/agent/hub-connection : received see_you
363 23:05:31  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
463 23:05:36  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
563 23:05:41  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
upload-support - 向OAK上传一个支持文件. 请将末尾打印的哈希值提供给我们的支持团队.例:
Command Line
1$ hubctl upload-support
2File has been uploaded with hash: f0a83c01bc4c7c7f0bd466d6cca2ec9071f8c267e6e65385f744e94f1caa734d
reset - 重置OAK Hub Agent 至安装后的状态.
Requires root privileges
例:
Command Line
1$ sudo hubctl reset --i-understand-consequences --keep-robot-in-cloud

云端指令

cloud connect - 连接OAK Hub Agent 到 OAK Hub.例:
Command Line
1$ hubctl cloud connect
2Already connected to cloud (team Luxonis). Disconnect first to connect again.
3hubctl cloud disconnect
cloud disconnect - 从 OAK Hub将OAK Hub Agent断连.例:
Command Line
1$ hubctl cloud disconnect
cloud force-sync - 强制与OAK Hub 手动同步.An example:
Command Line
1$ hubctl cloud force-sync

设备指令

devices - 显示连接到OAK Hub Agent的设备列表.例:
Command Line
1$ hubctl devices
2┌────────────────────┬────────────────────┬───────────────────────┬──────────┬─────────┬──────────────────┬──────┐
3│ serial             │ name               │ product               │ location │ status  │ connectionStatus │ app  │
4├────────────────────┼────────────────────┼───────────────────────┼──────────┼─────────┼──────────────────┼──────┤
5│ 18443010116C870E00 │ 18443010116C870E00 │ OAK-D-PRO-FF (DM9098) │ USB 2.1  │ success │ ready            │ none │
6└────────────────────┴────────────────────┴───────────────────────┴──────────┴─────────┴──────────────────┴──────┘

App指令

apps list - 显示已安装的程序列表.例:
Command Line
1$ hubctl apps list
2┌──────────────────────────────────────┬─────────┬─────────┬──────────────────────────┬────────────┐
3idtype    │ status  │ started at               │ stopped at │
4├──────────────────────────────────────┼─────────┼─────────┼──────────────────────────┼────────────┤
5│ bfeb4f73-f503-458a-8c24-b88258f9523a │ builtin │ Running │ 2024-03-01T08:15:33.282Z │            │
6└──────────────────────────────────────┴─────────┴─────────┴──────────────────────────┴────────────┘