Outils pour utilisateurs

Outils du site


tech:notes_socket_unix

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_socket_unix [2025/04/02 14:13] Jean-Baptistetech:notes_socket_unix [2026/03/20 11:12] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon}}
 +
 +# Notes socket Unix
 +
 +Voir :
 +* [[Postgres - se connecter a une socket]]
 +* https://kohlschutter.github.io/junixsocket/unixsockets.html
 +
 +~~~bash
 +netstat -ln | grep mysql
 +
 +ss -x
 +netstat --unix
 +
 +
 +cat /proc/net/unix
 +~~~
 +
 +Connect to an existing stream socket
 +~~~bash
 +nc -U /path/to/socket
 +~~~
 +
 +Create a listening stream socket
 +~~~bash
 +nc -lU /path/to/socket
 +~~~
 +
 +~~~
 +# lsof -U -a -p $(pidof mysqld)
 +COMMAND  PID  USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME
 +mysqld  1766 mysql   18u  unix 0xffffa0c0b6f97800      0t0 26264 /var/run/mysqld/mysqld.sock type=STREAM
 +~~~
 +
 +~~~bash
 +sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info | jq
 +~~~
 +
 +Podman
 +~~~
 +$ sudo curl -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/_ping
 +OK
 +~~~
 +
 +## Unit socket SystemD
 +
 +Voir :
 +* https://mgdm.net/weblog/systemd-socket-activation/
 +
 +
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki