bookmark_borderUsing socat or netcat to debug unix sockets like telnet for tcp

Sometimes you want to debug a service with a clear text protocol, but it uses unix sockets instead of INET sockets.

Surprisingly, there is little info on this around the net.

An easy solution would be socat:

socat UNIX-CONNECT:/var/run/blabla/nameofthe.sock STDIN

EDIT: Linux consultant Stefan Seyfried pointed out, that from openSUSE 12.1 onwards you can also use netcat. The new opensuse version ships netcat-openbsd.

The syntax is:

nc -U /var/run/blabla/namedersocket.sock