From 3ff919f8eb9fa7eb98887f029be7f817de7a1303 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Tue, 19 Nov 2019 12:00:57 +0000 Subject: Telemetry: Add more operational data + Add both NDR and PDR telemetry capture + Speedup sockets + Adjust privileges Signed-off-by: Peter Mikus Change-Id: Ia6fd5d405e6fb410651d8b705c921653753aea10 --- resources/libraries/python/VppCounters.py | 46 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'resources/libraries/python/VppCounters.py') diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py index e6bb51ef4e..411302ae58 100644 --- a/resources/libraries/python/VppCounters.py +++ b/resources/libraries/python/VppCounters.py @@ -114,7 +114,7 @@ class VppCounters: ) @staticmethod - def vpp_show_runtime_counters_on_all_duts(nodes): + def vpp_show_runtime_on_all_duts(nodes): """Clear VPP runtime counters on all DUTs. :param nodes: VPP nodes. @@ -125,8 +125,8 @@ class VppCounters: VppCounters.vpp_show_runtime(node) @staticmethod - def vpp_show_hardware_verbose(node): - """Run "show hardware-interfaces verbose" debug CLI command. + def vpp_show_interface(node): + """Run "show interface" debug CLI command. :param node: Node to run command on. :type node: dict @@ -148,6 +148,17 @@ class VppCounters: node, u"show memory verbose api-segment stats-segment main-heap" ) + @staticmethod + def vpp_show_memory_on_all_duts(nodes): + """Run "show memory" on all DUTs. + + :param nodes: VPP nodes. + :type nodes: dict + """ + for node in nodes.values(): + if node[u"type"] == NodeType.DUT: + VppCounters.vpp_show_memory(node) + @staticmethod def vpp_clear_runtime(node): """Run "clear runtime" CLI command. @@ -160,7 +171,7 @@ class VppCounters: ) @staticmethod - def vpp_clear_runtime_counters_on_all_duts(nodes): + def vpp_clear_runtime_on_all_duts(nodes): """Run "clear runtime" CLI command on all DUTs. :param nodes: VPP nodes. @@ -171,8 +182,8 @@ class VppCounters: VppCounters.vpp_clear_runtime(node) @staticmethod - def vpp_clear_hardware_counters(node): - """Run "clear hardware" CLI command. + def vpp_clear_interfaces(node): + """Run "clear interfaces" CLI command. :param node: Node to run command on. :type node: dict @@ -180,22 +191,22 @@ class VppCounters: :rtype: dict """ PapiSocketExecutor.run_cli_cmd_on_all_sockets( - node, u"clear hardware", log=False + node, u"clear interfaces", log=False ) @staticmethod - def vpp_clear_hardware_counters_on_all_duts(nodes): - """Clear hardware counters on all DUTs. + def vpp_clear_interfaces_on_all_duts(nodes): + """Clear interfaces on all DUTs. :param nodes: VPP nodes. :type nodes: dict """ for node in nodes.values(): if node[u"type"] == NodeType.DUT: - VppCounters.vpp_clear_hardware_counters(node) + VppCounters.vpp_clear_interfaces(node) @staticmethod - def vpp_clear_errors_counters(node): + def vpp_clear_errors(node): """Run "clear errors" CLI command. :param node: Node to run command on. @@ -206,7 +217,7 @@ class VppCounters: ) @staticmethod - def vpp_clear_error_counters_on_all_duts(nodes): + def vpp_clear_errors_on_all_duts(nodes): """Clear VPP errors counters on all DUTs. :param nodes: VPP nodes. @@ -214,7 +225,7 @@ class VppCounters: """ for node in nodes.values(): if node[u"type"] == NodeType.DUT: - VppCounters.vpp_clear_errors_counters(node) + VppCounters.vpp_clear_errors(node) @staticmethod def show_vpp_statistics(node): @@ -224,9 +235,7 @@ class VppCounters: :type node: dict """ VppCounters.vpp_show_errors(node) - VppCounters.vpp_show_hardware_verbose(node) - VppCounters.vpp_show_runtime(node) - VppCounters.vpp_show_memory(node) + VppCounters.vpp_show_interface(node) @staticmethod def show_statistics_on_all_duts(nodes): @@ -246,9 +255,8 @@ class VppCounters: :param node: VPP node. :type node: dict """ - VppCounters.vpp_clear_errors_counters(node) - VppCounters.vpp_clear_hardware_counters(node) - VppCounters.vpp_clear_runtime(node) + VppCounters.vpp_clear_errors(node) + VppCounters.vpp_clear_interfaces(node) @staticmethod def clear_statistics_on_all_duts(nodes): -- cgit 1.2.3-korg