Capture Performance Data Locally
  • 29 Mar 2023
  • 1 Minute to read
  • Contributors
  • PDF

Capture Performance Data Locally

  • PDF

Article summary

Capture Performance Data Locally

It is possible to capture performance data locally to observe what is sent to the Data Broker.


NOTE: Available starting with 22.11.

Requirements

  • Agents 22.11+
  • Test or continuous sessions running.
  • Agent connected to the data broker (roadrunner).

Options

# dataCapture -h
Capture the OpenMetric data being sent to the data broker. This requires an
active connection to the data broker.
-h|?            Show this help.
-l              Listen only, do no enable/disable MQTT forwarding.
                Data forwarding to MQTT needs to be enabled via
                the agentStatus command.
-q              Quiet, only display data.

Calling Methods

Via an Interactive Shell:

$ sudo docker exec -it <CONTAINER ID> /bin/bash -l
# dataCapture -h

Via Docker Exec:

$ sudo docker exec <CONTAINER ID> /usr/bin/dataCapture

Capture to File

To capture to file the method above can be used with stdout redirected to a file.

# dataCapture > /tmp/mycapture

Exporting the Captured Data

Two methods are possible: “docker cp” or mounted volumes.

Docker Cp

From the host files can be copied out of the container using “docker cp”.

$ sudo docker cp <containerId>:/tmp/mycapture /path/to/local/directory/

Mounted Volume

Adding an additional volume to the Docker run/docker-compose commands will allow writing directly in a host folder.

Capture to Terminal Example

Using the command dataCapture will display the transmitted data to the controlling terminal. To end the capture process Ctrl-c.

# dataCapture
Enable internal forwarding of performance data
performance_data_gateway_sequence{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba"} 1730 1654529915275

dummy_run_count{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",direction="Downstream",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 123674 1654529913556
dummy_rx_bytes{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 63843637 1654529913556
dummy_rx_packets{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 769712 1654529913556
dummy_tx_bytes{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 648180719 1654529913556
dummy_tx_packets{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 1253582 1654529913556
dummyCpuLoad1Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 0.163086 1654529913556
dummyCpuLoad5Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 0.175781 1654529913556
dummyCpuLoad15Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="0",HostName="106fe8c56f89",sessionId="a38b3569-df44-4cdf-b3d4-89252b5f67b5",sessionName="dummy-0"} 0.265625 1654529913556

performance_data_gateway_sequence{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba"} 1731 1654529915275

dummy_run_count{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",direction="Upstream",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 133673 1654529913556
dummy_rx_bytes{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 63843637 1654529913556
dummy_rx_packets{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 769712 1654529913556
dummy_tx_bytes{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 648180719 1654529913556
dummy_tx_packets{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 1253582 1654529913556
dummyCpuLoad1Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 0.163086 1654529913556
dummyCpuLoad5Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 0.175781 1654529913556
dummyCpuLoad15Min{agentId="4c5b8006-0676-4635-a4b4-fb7fbb622bba",agentType="dummy",objectType="dummy",streamId="1",HostName="106fe8c56f89",sessionId="1830088f-4944-4756-a6d2-7e8bca3c5ee4",sessionName="dummy-1"} 0.265625 1654529913556

^CDisable internal forwarding of performance data
#

© 2024 Cisco and/or its affiliates. All rights reserved.
 
For more information about trademarks, please visit: Cisco trademarks
For more information about legal terms, please visit: Cisco legal terms

For legal information about Accedian Skylight products, please visit: Accedian legal terms and tradmarks



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.