Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-12 00:21:51 +00:00
parent f3773777cf
commit 2c1898f6e4
71 changed files with 121 additions and 92 deletions

View File

@@ -6,24 +6,24 @@ source: https://github.com/tldr-pages/tldr.git
# gnmic subscribe
> Subscribe to a gnmic network device state updates.
> More information: <https://gnmic.kmrd.dev/cmd/subscribe>.
> More information: <https://gnmic.openconfig.net/cmd/subscribe/>.
- Subscribe to target state updates under the subtree of a specific path:
`gnmic {{[-a|--address]}} {{ip:port}} subscribe --path {{path}}`
`gnmic {{[-a|--address]}} {{ip:port}} {{[sub|subscribe]}} --path {{path}}`
- Subscribe to a target with a sample interval of 30s (default is 10s):
`gnmic {{[-a|--address]}} {{ip:port}} subscribe --path {{path}} --sample-interval 30s`
`gnmic {{[-a|--address]}} {{ip:port}} {{[sub|subscribe]}} --path {{path}} --sample-interval 30s`
- Subscribe to a target with sample interval and updates only on change:
`gnmic {{[-a|--address]}} {{ip:port}} subscribe --path {{path}} --stream-mode on-change --heartbeat-interval {{1m}}`
`gnmic {{[-a|--address]}} {{ip:port}} {{[sub|subscribe]}} --path {{path}} --stream-mode on-change --heartbeat-interval {{1m}}`
- Subscribe to a target for only one update:
`gnmic {{[-a|--address]}} {{ip:port}} subscribe --path {{path}} --mode once`
`gnmic {{[-a|--address]}} {{ip:port}} {{[sub|subscribe]}} --path {{path}} --mode once`
- Subscribe to a target and specify response encoding (json_ietf):
`gnmic {{[-a|--address]}} {{ip:port}} subscribe --path {{path}} {{[-e|--encoding]}} json_ietf`
`gnmic {{[-a|--address]}} {{ip:port}} {{[sub|subscribe]}} --path {{path}} {{[-e|--encoding]}} json_ietf`