Ajout process socket
This commit is contained in:
parent
bd4732f356
commit
49e5e02d73
14
TipsShell.md
14
TipsShell.md
|
@ -161,4 +161,18 @@ Ou regarder les IPs en direct :
|
||||||
~~~
|
~~~
|
||||||
# SEUIL=5; tail -f /var/log/apache2/access.log | stdbuf -oL cut -d ' ' -f1 | stdbuf -oL uniq -c | \
|
# SEUIL=5; tail -f /var/log/apache2/access.log | stdbuf -oL cut -d ' ' -f1 | stdbuf -oL uniq -c | \
|
||||||
eval "awk '\$1 > $SEUIL {printf \"\\033[1;31m\" \$1 \" \" \$2 \"\\033[0m \\n\"; next;};{printf \$1 \" \" \$2 \"\\n\";}'"
|
eval "awk '\$1 > $SEUIL {printf \"\\033[1;31m\" \$1 \" \" \$2 \"\\033[0m \\n\"; next;};{printf \$1 \" \" \$2 \"\\n\";}'"
|
||||||
|
~~~
|
||||||
|
|
||||||
|
## Un processus par rapport à la socket
|
||||||
|
|
||||||
|
- Connaître les sockets ouvertes et ports en écoutent par un processus :
|
||||||
|
|
||||||
|
~~~{.bash}
|
||||||
|
$ lsof -Pan -p PID -i
|
||||||
|
~~~
|
||||||
|
|
||||||
|
- Connaître le pid qui écoute sur un port (2ème colonne) :
|
||||||
|
|
||||||
|
~~~{.bash}
|
||||||
|
$ lsof -i :Port
|
||||||
~~~
|
~~~
|
Loading…
Reference in a new issue