147 ms·
You can use lsof in Linux to show connexions: lsof -i -n -P | grep "\\-\>" | awk '{a[\$1"_p"\$2]++;}END{ for (it in a){print it,a[it]}}' | sort -nr -k2,2 This
by heresie-dabord 4y ago
You can use lsof in Linux to show connexions:
lsof -i -n -P | grep "\\-\>" | awk '{a[\$1"_p"\$2]++;}END{ for (it in a){print it,a[it]}}' | sort -nr -k2,2
This project uses conky to display the current connexions:
https://github.com/viviparous/plonky/blob/main/plonky.pl https://github.com/viviparous/plonky/blob/main/plonky.pl
- mistrial9 4y agothat awk expression fails here (v5.1)
- heresie-dabord 4y agoAh yes, it doesn't require the escapes that I pasted above. awk '{a[$1"_p"$2]++;}END{ for(it in a){print it,a[it]}}'
- gus_ 4y agounfortunately malicious lkms and userland rootkits can hide processes/connections from lsof/netstat https://github.com/gianlucaborello/libprocesshider https://github.com/gianlucaborello/libprocesshider