Forrest logo
tool overview
On this page you find all important commands for the CLI tool gnmic. If the command you are looking for is missing please ask our AI.

gnmic

gnmic is a command line tool used for interacting with network devices using the gNMI (gRPC Network Management Interface) protocol. gNMI is an industry-standard protocol for network management and telemetry, developed by Google, that enables efficient and secure communication between network devices and management systems.

gnmic provides a simple and flexible way to configure and monitor network devices. It supports various operations like getting, setting, subscribing, and deleting the configuration or state data of network devices. It can be used to retrieve operational data from devices, configure settings, troubleshoot network issues, and perform other management tasks.

gnmic uses the gRPC (Google Remote Procedure Call) framework to establish a connection and exchange messages with network devices. The tool supports authentication and secure communication using TLS (Transport Layer Security) encryption.

It offers a command line interface (CLI) with user-friendly commands and options for interacting with network devices. The CLI allows users to easily navigate and interact with the device's data model, which defines the structure and organization of the configurable and operational data.

gnmic is an open-source tool and is available on various platforms, including Linux, macOS, and Windows. It can be easily integrated into existing network management systems or used as a standalone tool for network device management and monitoring.

List of commands for gnmic:

  • gnmic-get:tldr:17ec2 gnmic-get: Query the device state at multiple paths with a common prefix.
    $ gnmic -a ${ip:port} get --prefix ${prefix} --path ${path1} --path ${path2}
    try on your machine
    explain this command
  • gnmic-get:tldr:6772a gnmic-get: Get a snapshot of the device state at a specific path.
    $ gnmic --address ${ip:port} get --path ${path}
    try on your machine
    explain this command
  • gnmic-get:tldr:d8460 gnmic-get: Query the device state at multiple paths.
    $ gnmic -a ${ip:port} get --path ${path1} --path ${path2}
    try on your machine
    explain this command
  • gnmic-get:tldr:fd83f gnmic-get: Query the device state and specify response encoding (json_ietf).
    $ gnmic -a ${ip:port} get --path ${path} --encoding json_ietf
    try on your machine
    explain this command
  • gnmic-set:tldr:4b1cd gnmic-set: Update the value of a path.
    $ gnmic --address ${ip:port} set --update-path ${path} --update-value ${value}
    try on your machine
    explain this command
  • gnmic-set:tldr:695bf gnmic-set: Replace the value of a path to match the contents of a json file.
    $ gnmic -a ${ip:port} set --replace-path ${path} --replace-file ${filepath}
    try on your machine
    explain this command
  • gnmic-set:tldr:803fa gnmic-set: Update the value of a path to match the contents of a json file.
    $ gnmic -a ${ip:port} set --update-path ${path} --update-file ${filepath}
    try on your machine
    explain this command
  • gnmic-set:tldr:fcd3b gnmic-set: Delete the node at a given path.
    $ gnmic -a ${ip:port} set --delete ${path}
    try on your machine
    explain this command
  • gnmic-subscribe:tldr:843dd gnmic-subscribe: Subscribe to a target for only one update.
    $ gnmic -a ${ip:port} subscribe --path ${path} --mode once
    try on your machine
    explain this command
  • gnmic-subscribe:tldr:b9886 gnmic-subscribe: Subscribe to a target with sample interval and updates only on change.
    $ gnmic -a ${ip:port} subscribe --path ${path} --stream-mode on-change --heartbeat-interval 1m
    try on your machine
    explain this command
  • gnmic-subscribe:tldr:e7b8f gnmic-subscribe: Subscribe to a target and specify response encoding (json_ietf).
    $ gnmic -a ${ip:port} subscribe --path ${path} --encoding json_ietf
    try on your machine
    explain this command
  • gnmic-subscribe:tldr:e905f gnmic-subscribe: Subscribe to a target with a sample interval of 30s (default is 10s).
    $ gnmic -a ${ip:port} subscribe --path ${path} --sample-interval 30s
    try on your machine
    explain this command
  • gnmic-subscribe:tldr:f749f gnmic-subscribe: Subscribe to target state updates under the subtree of a specific path.
    $ gnmic --address ${ip:port} subscribe --path ${path}
    try on your machine
    explain this command
  • gnmic:tldr:3ebdb gnmic: Provide a username and password to fetch device capabilities.
    $ gnmic --address ${ip:port} --username ${username} --password ${password} capabilities
    try on your machine
    explain this command
  • gnmic:tldr:a5b11 gnmic: Subscribe to target state updates under the subtree at a specific path.
    $ gnmic -a ${ip:port} subscribe --path ${path}
    try on your machine
    explain this command
  • gnmic:tldr:b59d1 gnmic: Get a snapshot of the device state at a specific path.
    $ gnmic -a ${ip:port} get --path ${path}
    try on your machine
    explain this command
  • gnmic:tldr:ccfd9 gnmic: Request device capabilities.
    $ gnmic --address ${ip:port} capabilities
    try on your machine
    explain this command
  • gnmic:tldr:feb8a gnmic: Update device state at a specific path.
    $ gnmic -a ${ip:port} set --update-path ${path} --update-value ${value}
    try on your machine
    explain this command
tool overview