Explorar el Código

Merge pull request #78 from lbonanomi/awkwards

Minor awk tweak
pull/79/head
@trimstray hace 5 años
committed by GitHub
padre
commit
290949302a
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 2 adiciones y 7 borrados
  1. +2
    -7
      README.md

+ 2
- 7
README.md Ver fichero

@@ -2646,13 +2646,8 @@ ___
###### Graph # of connections for each hosts

```bash
netstat -an | \
grep ESTABLISHED | \
awk '{print $5}' | \
awk -F: '{print $1}' | \
grep -v -e '^[[:space:]]*$' | \
sort | uniq -c | \
awk '{ printf("%s\t%s\t",$2,$1) ; for (i = 0; i < $1; i++) {printf("*")}; print "" }'
netstat -an | awk '/ESTABLISHED/ { split($5,ip,":"); if (ip[1] !~ /^$/) print ip[1] }' | \
sort | uniq -c | awk '{ printf("%s\t%s\t",$2,$1) ; for (i = 0; i < $1; i++) {printf("*")}; print "" }'
```

###### Monitor open connections for specific port including listen, count and sort it per IP


Cargando…
Cancelar
Guardar