mirror_frr/tools
Sri Mohana Singamsetty e60eb780e4 FRR: Python script to generate support bundle for FRR
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>
2019-02-20 11:56:22 -08:00
..
etc FRR: Python script to generate support bundle for FRR 2019-02-20 11:56:22 -08:00
.gitignore debian/tools: new init script 2018-12-06 23:05:48 +01:00
build-debian-package.sh tools: add a script for building a Debian package in one step. 2018-10-01 20:44:01 +02:00
checkpatch.pl tools: update checkpatch to stop suggesting the use of kstrto() 2018-12-09 13:59:19 -02:00
checkpatch.sh tools: improve checkpatch slicing 2018-08-03 17:25:14 +00:00
cocci.h *: reindent 2017-07-17 14:04:07 +02:00
convert-fixedwidth.sh tools, doc: update checkpatch for u_int_* 2018-03-27 15:00:23 -04:00
fixup-deprecated.py tools: add fixup-deprecated.py script to replace deprecated quagga/frr mactors/types/etc. 2018-03-29 18:33:31 -04:00
frr-reload tools: Add helper frr-reload shell script for clean error 2018-03-14 17:31:29 -07:00
frr-reload.py tools: stop frr-reload.py from trying to delete the vrf context 2018-12-14 13:11:05 +00:00
frr.in tools/frr: get rid of the bash array and "bB" 2018-12-06 17:29:27 +01:00
frr.service tools: fix systemd dependency graph 2019-02-06 19:47:43 +00:00
frrcommon.sh.in tools/frrcommon.sh: always start staticd 2018-12-18 01:26:12 +01:00
frrinit.sh.in debian/tools: new init script 2018-12-06 23:05:48 +01:00
gen_northbound_callbacks.c libs, rip, isis: change northbound operation enum to DESTROY 2019-02-11 15:49:49 -02:00
gen_yang_deviations.c lib: rework the yang schema node iteration functions 2018-11-26 17:38:08 -02:00
generate_support_bundle.py FRR: Python script to generate support bundle for FRR 2019-02-20 11:56:22 -08:00
git-reindent-branch.py *: move random tools into tools/ 2018-02-20 12:37:41 -05:00
indent.py tools: update indent.py for DEFPY_* macros 2018-04-10 12:19:14 -04:00
lua.scr bgpd: Add lua match command 2018-09-26 21:21:23 -04:00
Makefile build: non-recursive watchfrr & tools 2017-09-07 16:18:50 +02:00
mrlg.txt mrlg: Remove obsolete version. 2016-05-26 01:16:28 +00:00
multiple-bgpd.sh tools: update to use FRR name 2017-07-12 13:26:22 -05:00
permutations.c tools: null check (Coverity 1399484) 2018-09-20 16:23:52 +02:00
render_md.py *: move random tools into tools/ 2018-02-20 12:37:41 -05:00
rrcheck.pl tools: use standard interpreter path in all Perl scripts 2012-04-30 16:13:47 +02:00
rrlookup.pl tools: use standard interpreter path in all Perl scripts 2012-04-30 16:13:47 +02:00
start-stop-daemon.c Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
subdir.am build: fix a whole bunch of *FLAGS 2019-01-30 19:13:51 +01:00
vty_check.cocci *: kill useless if(...) after VTY_DECLVAR_CONTEXT 2016-12-09 17:50:01 +01:00
vty_index.cocci tools: update to use FRR name 2017-07-12 13:26:22 -05:00
vty_index.sh *: fix remaining vty->index & add coccinelle patch 2016-12-09 17:36:25 +01:00
watchfrr.sh.in debian/tools: new init script 2018-12-06 23:05:48 +01:00
zc.pl tools: use standard interpreter path in all Perl scripts 2012-04-30 16:13:47 +02:00
zebra.el Initial revision 2002-12-13 20:15:29 +00:00
zprivs.cocci *: use frr_elevate_privs() (1/2: coccinelle) 2018-08-14 20:02:05 +00:00