With Wireshark, you can perform real-time and interactive analysis of the data that has been captured, perfect for diagnosis errors on a network.
It can view data in real-time and also log the data being sent on a network to a file on disk. Wireshark (formerly known as Ethereal until a few years ago) is a very popular, completely free and highly recommended network protocol analyzer.