summaryrefslogtreecommitdiffstats
path: root/tools/etc
diff options
context:
space:
mode:
authorSri Mohana Singamsetty <msingamsetty@vmware.com>2019-02-20 20:56:22 +0100
committerSri Mohana Singamsetty <msingamsetty@vmware.com>2019-02-20 20:56:22 +0100
commite60eb780e48396088c58131ff0af7b828fa93baa (patch)
tree2031af33374e9badff70885384b104f78734df89 /tools/etc
parentMerge pull request #3835 from qlyoung/build-update-libyang-doc-link (diff)
downloadfrr-e60eb780e48396088c58131ff0af7b828fa93baa.tar.xz
frr-e60eb780e48396088c58131ff0af7b828fa93baa.zip
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>
Diffstat (limited to 'tools/etc')
-rw-r--r--tools/etc/frr/support_bundle_commands.conf83
1 files changed, 83 insertions, 0 deletions
diff --git a/tools/etc/frr/support_bundle_commands.conf b/tools/etc/frr/support_bundle_commands.conf
new file mode 100644
index 000000000..d52824ff0
--- /dev/null
+++ b/tools/etc/frr/support_bundle_commands.conf
@@ -0,0 +1,83 @@
+# FRR Support Bundle Command List
+# Do Not modify the lines that start with
+# PROC_NAME, CMD_LIST_START and CMD_LIST_END
+# Add the new command for each process between
+# CMD_LIST_START and CMD_LIST_END lines
+
+# BGP Support Bundle Command List
+PROC_NAME:bgp
+CMD_LIST_START
+show bgp summary
+show ip bgp
+show ip bgp neighbors
+show ip bgp summary
+show ip bgp statistics
+
+show ip bgp update-groups advertise-queue
+show ip bgp update-groups advertised-routes
+show ip bgp update-groups packet-queue
+show ip bgp update-groups statistics
+show ip bgp peer-group
+show ip bgp memory
+
+show bgp ipv6
+show bgp ipv6 neighbors
+show bgp ipv6 summary
+show bgp ipv6 update-groups advertise-queue
+show bgp ipv6 update-groups advertised-routes
+show bgp ipv6 update-groups packet-queue
+show bgp ipv6 update-groups statistics
+show ip bgp statistics
+
+show bgp evpn route
+CMD_LIST_END
+
+# Zebra Support Bundle Command List
+PROC_NAME:zebra
+CMD_LIST_START
+show zebra
+show zebra client summary
+show ip route
+
+show route-map
+show memory
+show interface
+show vrf
+show error all
+show work-queues
+show running-config
+show thread cpu
+show thread poll
+show daemons
+show version
+CMD_LIST_END
+
+# OSPF Support Bundle Command List
+# PROC_NAME:ospf
+# CMD_LIST_START
+# CMD_LIST_END
+
+# RIP Support Bundle Command List
+# PROC_NAME:rip
+# CMD_LIST_START
+# CMD_LIST_END
+
+# ISIS Support Bundle Command List
+# PROC_NAME:isis
+# CMD_LIST_START
+# CMD_LIST_END
+
+# BFD Support Bundle Command List
+# PROC_NAME:bfd
+# CMD_LIST_START
+# CMD_LIST_END
+
+# STATIC Support Bundle Command List
+# PROC_NAME:static
+# CMD_LIST_START
+# CMD_LIST_END
+
+# PIM Support Bundle Command List
+# PROC_NAME:pim
+# CMD_LIST_START
+# CMD_LIST_END