I assume that you are using ALSA. If so, you can use
my KMidimon utility.
It
has a nice KDE GUI:
http://kmetronome.sourceforge.net/kmidimon/
If you prefer a CLI interface, you can use "aseqdump", included in
alsa-utils-1.0.9, or "arecordmidi --dump" in previous releases.
With a Gnome GUI and for OSS, there is GMidiMon:
http://dufourko.free.fr/gmidimon/index.html
Thanks Pedro, Christopher has already point me on the kmidimon solution,
in fact I have installed gmidimon (more simple to install with my setup).
Then I have tried aseqdump, but the two tools (aseqdump and gmidimon)
don't give me the same informations.
gmidimon give me a number of controller (ie 176) and the other give me a
port number (ie 80). I want to know this information in order to use my
midi units in ecasound but it doesn't work, I will send an help request to
the ecasound list about the confuse (for me) midi implementation.
Regards
Philippe