Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a conky script that includes the tcp_monitor, but it shows all the localhost connections, too. (::1 and 127.0.0.1)

I cannot split the display by port numbers, as most conky configs do, so I need to filter out localhost.

Are there any ideas?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Having just received the 'Tumbleweed' badge for this question, I think I will answer it with an alternate configuration in case it helps someone:

${execp netstat -upant | grep "tcp\|udp" | grep -v "127.0.0.1\|::1" | awk '{split($4, a, ":"); print "%s %s\n", a[1], a[2] }' }

From this starting place, I can grep for different states, different IPs, etc. It's not as good as tcp_monitor and it eats more resources, but it works for my needs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.