'How to monitor traffics of serial port in Linux?

I have a Captron button connected to serial port /dev/ttyS0 in a remote Linux system, I want to monitor the traffics of the serial port when the button is pressed (What bytes is being written and where the bytes is being written to), what tool should I use to do that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source