← 返回命令列表

Linux command

gnmic 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Get configuration

gnmic -a [router:57400] get --path [/interfaces]

Set value

gnmic -a [router:57400] set --update-path [/interface/name] --update-value "[eth0]"

Subscribe to telemetry

gnmic -a [router:57400] subscribe --path [/interfaces/interface/statistics]

List capabilities

gnmic -a [router:57400] capabilities

说明

gnmic is a gNMI (gRPC Network Management Interface) CLI client. It interacts with network devices supporting gNMI for configuration retrieval, modification, and streaming telemetry. The tool supports get, set, subscribe, and capability operations. It is used for network automation and monitoring with modern network operating systems.

参数

-a _ADDRESS_
Target address:port.
get
Get configuration/state.
set
Set configuration.
subscribe
Subscribe to telemetry.
capabilities
Query capabilities.
--path _PATH_
YANG path.
--help
Display help information.

FAQ

What is the gnmic command used for?

gnmic is a gNMI (gRPC Network Management Interface) CLI client. It interacts with network devices supporting gNMI for configuration retrieval, modification, and streaming telemetry. The tool supports get, set, subscribe, and capability operations. It is used for network automation and monitoring with modern network operating systems.

How do I run a basic gnmic example?

Run `gnmic -a [router:57400] get --path [/interfaces]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a _ADDRESS_ do in gnmic?

Target address:port.