Substitua cat /proc/net/ip_conntrack
por conntrack -L
. É mais eficiente com grande número de conexões.
Exemplo:
root@utemp:~# time conntrack -L | wc -l
conntrack v0.9.14 (conntrack-tools): 16855 flow entries have been shown.
16855
real 0m0.099s
user 0m0.068s
sys 0m0.036s
root@utemp:~# time cat /proc/net/ip_conntrack | wc -l
16634
real 0m0.270s
user 0m0.008s
sys 0m0.264s