Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

29
gnmic-subscribe Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
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>.
- Subscribe to target state updates under the subtree of a specific path:
`gnmic --address {{ip:port}} subscribe --path {{path}}`
- Subscribe to a target with a sample interval of 30s (default is 10s):
`gnmic -a {{ip:port}} subscribe --path {{path}} --sample-interval 30s`
- 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`
- Subscribe to a target for only one update:
`gnmic -a {{ip:port}} subscribe --path {{path}} --mode once`
- Subscribe to a target and specify response encoding (json_ietf):
`gnmic -a {{ip:port}} subscribe --path {{path}} --encoding json_ietf`