mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-02-01 18:56:52 +00:00
This has a python script that helps in collecting various CLI show command outputs in an automated way.
This commit has two files.
1.Text Configuration file: support_bundle_commands.conf - This file has list of CLI show commands to be executed. This file will be in tools/etc/frr/ directory. On executing command "sudo install -m 644 tools/etc/frr/ support_bundle_commands.conf /etc/frr/support_bundle_commands.conf", as part of FRR installation, this file will be copied into /etc/frr directory.
2.Python script file: generate_support_bundle.py - This file has the python code that has the below functionality.
* It reads the support_bundle_commands.conf file. For each process present in the conf file, it creates a support_bundle file. For example, it creates bgp_support_bundle.log file for BGP and zebra_support_bundle.log file for Zebra. These files will be created in /var/log/frr/ directory. This is where regular FRR log files are also stored currently.
* The script reads the CLI command specified between CLI_START and CLI_END key words for each process. It will execute the commands one by one.
* For each such command, the script also appends the current time stamp at which the CLI command is executed.
* In case of successful execution of the CLI command, it will copy the CLI output into the above support bundle file.
* In case of CLI command failure, it will capture the error thrown and the error is also written into the same file.
* A small snippet of the output file is as below.
>>[2019-01-02 13:55:23.318987]show bgp summary
IPv4 Unicast Summary:
BGP router identifier 203.0.113.1, local AS number 65000 vrf-id 0
BGP table version 4
RIB entries 7, using 1176 bytes of memory
Peers 1, using 21 KiB of memory
Peer groups 1, using 64 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
203.0.113.2 4 65001 34 34 0 0 0 00:29:47 2
Total number of neighbors 1
>>[2019-01-02 13:55:23.619953]show ip bgp
BGP table version is 4, local router ID is 203.0.113.1, vrf id 0
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Signed-off-by: Sri Mohana Singamsetty <msingamsetty@vmware.com>
|
||
|---|---|---|
| .. | ||
| etc | ||
| .gitignore | ||
| build-debian-package.sh | ||
| checkpatch.pl | ||
| checkpatch.sh | ||
| cocci.h | ||
| convert-fixedwidth.sh | ||
| fixup-deprecated.py | ||
| frr-reload | ||
| frr-reload.py | ||
| frr.in | ||
| frr.service | ||
| frrcommon.sh.in | ||
| frrinit.sh.in | ||
| gen_northbound_callbacks.c | ||
| gen_yang_deviations.c | ||
| generate_support_bundle.py | ||
| git-reindent-branch.py | ||
| indent.py | ||
| lua.scr | ||
| Makefile | ||
| mrlg.txt | ||
| multiple-bgpd.sh | ||
| permutations.c | ||
| render_md.py | ||
| rrcheck.pl | ||
| rrlookup.pl | ||
| start-stop-daemon.c | ||
| subdir.am | ||
| vty_check.cocci | ||
| vty_index.cocci | ||
| vty_index.sh | ||
| watchfrr.sh.in | ||
| zc.pl | ||
| zebra.el | ||
| zprivs.cocci | ||