eProsima / Fast-DDS-monitor

eProsima Fast DDS Monitor is a graphical desktop application aimed at monitoring DDS environments deployed using the eProsima Fast DDS library. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
GNU General Public License v3.0
42 stars 11 forks source link

Fast-DDS Monitor did not pick the traffic data. #151

Open iekhanx opened 2 years ago

iekhanx commented 2 years ago

Hi forum, I am trying to use Fast-DDS monitor to lay out latency graph and other useful options to check with current traffic over the network I configured the "fastdds-monitor" as follow:

export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;PUBLICATION_THROUGHPUT_TOPIC;\ SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;RTPS_LOST_TOPIC;\ HEARTBEAT_COUNT_TOPIC;ACKNACK_COUNT_TOPIC;NACKFRAG_COUNT_TOPIC;\ GAP_COUNT_TOPIC;DATA_COUNT_TOPIC;RESENT_DATAS_TOPIC;SAMPLE_DATAS_TOPIC;\ PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC"

When I try to run following syntax the app fails ./DDSHelloWorld publisher 0 500

Monitor_Did_NOT_record_data

$ ./DDSHelloWorld publisher Starting DDSHelloWorld DataWriter created. DDSHelloWorld DataWriter waiting for DataReaders. DataWriter matched. DataWriter matched. Auto Sent: Message ('q' quit)

NOW Subscriber: export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;PUBLICATION_THROUGHPUT_TOPIC;\ SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;RTPS_LOST_TOPIC;\ HEARTBEAT_COUNT_TOPIC;ACKNACK_COUNT_TOPIC;NACKFRAG_COUNT_TOPIC;\ GAP_COUNT_TOPIC;DATA_COUNT_TOPIC;RESENT_DATAS_TOPIC;SAMPLE_DATAS_TOPIC;\ PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC"

./DDSHelloWorld subscriber

This program run without any issue.

But "fastdds-monitor" fail to gather data. Although messages are flowing across the two PC but not picked up by "fastdds-monitor" program to plot a graph or make sensible conclusion.

IF you please shed some light on this issue will be much obliged and grateful Thank you, IK

jparisu commented 2 years ago

Hi @iekhanx :

Your issue

Regarding the issue you are seeing in your execution, it is most likely that you have compiled Fast-DDS without statistics. You should use the CMake option -DFASTDDS_STATISTICS=ON (check Fast-DDS documentation https://fast-dds.docs.eprosima.com/en/latest/fastdds/statistics/statistics.html) in order to Fast-DDS compile the statistics module.

I think we can agree there is a lack of information in the Fast-DDS-Monitor documentaiton. There is a warning in the main page: https://fast-dds-monitor.readthedocs.io/en/latest/rst/formalia/titlepage.html regarding this, but it is true that it should be explicitly explained in the installation. Please, do not close this issue until we prepare a new PR to add it.

Fast DDS Suite

There is a new tool developed by our team that avoids you the installation phase, and allow to use all our products by docker. I am sure you would appreciate to avoid all the compilation steps. Just follow this documentation https://fast-dds.docs.eprosima.com/en/latest/docker/docker_demo/fast_dds_suite.html and download the docker image from our downloads page: https://www.eprosima.com/index.php/downloads-all This image has Fast-DDS, Fast-DDS-Monitor, and DDS Router.

DDS Router

I see you are using the DDS Router. Just a couple of comments:

Custom support

As you are using many eProsima products, and it seems you are encounter some problems that are easily solved by a meeting or two, I suggest you to speak with our support team: support@eProsima.com in order to negotiate some possible contracts. We would be happy to hear about your use case and to help you further in your project.

iekhanx commented 2 years ago

Hello jparisu Quote " You should use the CMake option -DFASTDDS_STATISTICS=ON (check Fast-DDS documentation https://fast-dds.docs.eprosima.com/en/latest/fastdds/statistics/statistics.html) in order to Fast-DDS compile the statistics module."

I did NOT build FastDDS from the source I downloaded a tarr file untarred on my PC and using ./install.sh i installed. Hence, I assume it is build using above specified options?

PS: As i knew our Manager Mr. Rhys Jones is in touch with eProsima team and Maria mahler seems to knew him I believe he is resuming on work on Monday at the office as main contact in Saab.

iekhanx commented 2 years ago

Hello jparisu Quote " You should use the CMake option -DFASTDDS_STATISTICS=ON (check Fast-DDS documentation https://fast-dds.docs.eprosima.com/en/latest/fastdds/statistics/statistics.html) in order to Fast-DDS compile the statistics module."

I did NOT build FastDDS from the source I downloaded a tarr file untarred on my PC and using ./install.sh i installed. Hence, I assume it is build using above specified options?

PS: As i knew our Manager Mr. Rhys Jones is in touch with eProsima team and Maria mahler seems to knew him I believe he is resuming on work on Monday at the office as main contact in Saab.

jparisu commented 2 years ago

You are right, using the .tgz file from downloads installs by default Fast DDS without statistics. I would suggest to use Docker instead.

However, if you want to use that .tgz package, you can manually change the install.sh file and add -DFASTDDS_STATISTICS=ON in the cmake line that compiles fastdds. This line must look like: cmake -DCMAKE_PREFIX_PATH=/usr/local -DBUILD_SHARED_LIBS=$dyn_link -DFASTDDS_STATISTICS=ON ../../src/fastrtps

iekhanx commented 2 years ago

Well I guess all this privileged info coming out after installation completed and product is doing what its purpose to transmit the messages across which is doing? It mean simply I have to restart all over again to cover for gathering statistics to rebuild the Fast-DDS from the scratch. These instructions should be covered in the README.md file which come with? There were files i.e optionparser.hpp missing in example (BOTH LINUX, WINDOW-10) from fastdds/example/C++/ directory and fastrtps.lib file is missing for MS WINDOW-10 build PROCESS to successfully build ALL the provided examples. The missing of these files from most recent download if you are still re-arranging entire structure of ".tgz" file then please include the missing files in the deploy-able(s), please: 1/ Although the optionparser.hpp and optionparser.h exists in the directoy of thirdparty/

iekhanx commented 2 years ago

1/ Althogh optionparser.hpp and optionparser.h these files exist in the build under thirdparty/ directory but their link is missing and build fails 2/ There were fastrtps-2.6.0.lib file exist but it did not allows to link with cmake process fail and subsequently MS visual studio fail too. Please provide or give clue for 1/ how to connect optionparser.hpp to the project as my understanding is to modify CMakefile.txt but tried that

The missing fastrtps.lib is failing all the example from build. Your valuable advise ...for.. waiting. Thank you, IK

iekhanx commented 2 years ago

HI jparisu, followings are code snippet where needed to be patched the statistic info gather variable On?

if [ -d src/foonathan_memory_vendor ]; then mkdir -p build/foonathan_memory_vendor cd build/foonathan_memory_vendor cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ ../../src/foonathan_memory_vendor cmake --build . --target install cd ../.. fi

for dyn_link in ON OFF do if [ -d src/fastcdr ]; then mkdir -p build/fastcdr cd build/fastcdr cmake -DBUILD_SHARED_LIBS=$dyn_link ../../src/fastcdr cmake --build . --target install cd ../.. fi

mkdir -p build/fastrtps
cd build/fastrtps
**cmake -DCMAKE_PREFIX_PATH=/usr/local -DBUILD_SHARED_LIBS=$dyn_link ../../src/fastrtps -DFASTDDS_STATISTICS=ON**
cmake --build . --target install
cd ../..

# remove build directories
rm -rf build

done

iekhanx commented 2 years ago

HI jparisu, Funny thing I noticed as you instructed to rebuild fastdds using statistic gather option, hence, I have to kill the running program 'fastdds' but the messages are still transmitted across the computers.

Then I killed DDS-Router program ddsrouter and to my surprise still messages transmission continues.

As I made this program at last weekend after watching one of your YouTub video to create a .idl file hence, i created two char values and two long values embedding in the .idl file and using fastddsgen --example DDSHelloWorld program it has created few cpp and hpp files which I build and start using it looks though the single program DDSHelloWorld contain all the functionality needed to transmit messages over the Wired network it has failed to use wireless connection. So the question IS? 1/ Where to fit-in fastdds program? 2/ Where to use DDS-Router program? 3/ When DDSHelloWorld program created by fastddsgen utility to provide all the functionality for transmitting custom messages? Cause I am not using Docker as special instruction to ME by my boss to use DDS-Router ONLY to demonstrate message transmit across the network. Your elaboration ..please. IK

iekhanx commented 2 years ago

HI jparisu, Here is freshly build Fast-DDS program in action load at the UDPv4 at 127.0.0.1:14520 port address and running. But still fastdds-monitor did NOT picking up the data over the network. Please advise? IK Monitor_Did_NOT_record_data_01

iekhanx commented 2 years ago

Following instruction from Fast-DDS-monitor running on Window-10 OS environment: replacing export to become "set" and using rest of the string as it is create an error "file not found" under windows-10 only can be run HelloWorldExample subscriber

So one can gather transmit statistics? While following statement does not work under window-10 OS.

export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;PUBLICATION_THROUGHPUT_TOPIC;\ SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;RTPS_LOST_TOPIC;\ HEARTBEAT_COUNT_TOPIC;ACKNACK_COUNT_TOPIC;NACKFRAG_COUNT_TOPIC;\ GAP_COUNT_TOPIC;DATA_COUNT_TOPIC;RESENT_DATAS_TOPIC;SAMPLE_DATAS_TOPIC;\ PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC"

./build/fastrtps/examples/C++/DDS/HelloWorldExample/DDSHelloWorldExample subscriber

zygfrydw commented 1 year ago

I am trying to use Fast-DDS Monitor but I am having the same issue - the Fast-DDS Monitor does NOT show any traffic.

I have tried using Fast-DDS Monitor with ROS2 Humble with no success, hence I have tested an example docker (ubuntu-eprosima-dds-suite:v1.4.0) provided at LINK.

I have followed the tutorial (some path changes were required, as the docker structure seams to diverged in time).

Reproductions steps:

docker run -it --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name fastdds ubuntu-eprosima-dds-suite:v1.4.0
goToExamples
cd dds/HelloWorldExample/bin
./DDSHelloWorldExample publisher -s 0
docker exec -it fastdds bash
goToExamples
cd dds/HelloWorldExample/bin
./DDSHelloWorldExample subscriber
docker exec -it fastdds bash
fastdds_monitor

image