I am trying to collect as much information as possible from a running Cardano node. Is there a way we can log the messages/packets exchanged between nodes in the Cardano P2P network?

Thank you.

  • Can you give us more information? Which platform are you running on? How did you install cardano-node? As a service(systemd) or in another way? Do you need all cardano-node logs or just part of it?
    – Nic_T2H
    Commented May 3, 2022 at 5:31
  • Hi, thank you for your response. I set up the cardano-node using the NIX package manager. I wanted to set it up as a service but could not find the documentation on how to do so. I would like to collect as much data as possible. Commented May 5, 2022 at 20:50
  • Hi, maybe this link could help you, what you need to do is to create a script to start the node and then create a service and enable it, let me know if you need help on setting things up coincashew.com/coins/overview-ada/… After that, you can check logs using "journalctl" command
    – Nic_T2H
    Commented May 9, 2022 at 5:21
  • Thank You @Nic_T2H, I will check out the steps. It seems to be a promising way to go about it. Doing this with NIX can get messy. The service will surely be the cleaner solution. Commented May 10, 2022 at 21:53
  • Good, let me know if you need help :-)
    – Nic_T2H
    Commented May 11, 2022 at 5:31

1 Answer 1


Do you really want packet level information?

If so, search the internet for network tools like 'wireshark' or 'tcpdump' and log IP/port traffic that is of interest.

If you want application level messages you can set your node logging to debug instead of the default info to get a heap more information from your node. This change will require a restart of your node.

  • Hi, thank you for your response. I changed the log file to debug and enabled logging for all the application level P2P mini-protocols. With regards to the packet level information, I wanted to collect the block information that is exchanged from specific peers along with their addresses. Wireshark/TCP dump traffic does not collect readable data. I assume the connections are encrypted. Commented May 5, 2022 at 20:48
  • I think TCP is used directly and that the connections aren't encrypted. Deserializing the raw packets will of course be a major hassle Commented Aug 24, 2022 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.