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

tech:notes_socket_unix [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_socket_unix [2025/04/02 14:13] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 {{tag>Brouillon}} {{tag>Brouillon}}
  
-Notes socket Unix+Notes socket Unix
  
 Voir : Voir :
 * [[Postgres - se connecter a une socket]] * [[Postgres - se connecter a une socket]]
 +* https://kohlschutter.github.io/junixsocket/unixsockets.html
  
-<code bash>+~~~bash
 netstat -ln | grep mysql netstat -ln | grep mysql
-</code> 
  
-<code ->+ss -
 +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) # lsof -U -a -p $(pidof mysqld)
 COMMAND  PID  USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME 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 mysqld  1766 mysql   18u  unix 0xffffa0c0b6f97800      0t0 26264 /var/run/mysqld/mysqld.sock type=STREAM
-</code>+~~~
  
-<code bash>+~~~bash
 sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info | jq sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info | jq
-</code>+~~~ 
  
-== Unit socket SystemD+## Unit socket SystemD
  
 Voir : Voir :
tech/notes_socket_unix.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki