Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tcpconnect] filter traced connection based on destination ports
Test: While running: while [ 1 ]; do nc -w 1 100.127.0.1 80; nc -w 1 100.127.0.1 81; done root@vagrant:/mnt/bcc# ./tools/tcpconnect.py PID COMM IP SADDR DADDR DPORT 19978 nc 4 10.0.2.15 100.127.0.1 80 19979 nc 4 10.0.2.15 100.127.0.1 81 19980 nc 4 10.0.2.15 100.127.0.1 80 19981 nc 4 10.0.2.15 100.127.0.1 81 root@vagrant:/mnt/bcc# ./tools/tcpconnect.py -P 80 PID COMM IP SADDR DADDR DPORT 19987 nc 4 10.0.2.15 100.127.0.1 80 19989 nc 4 10.0.2.15 100.127.0.1 80 19991 nc 4 10.0.2.15 100.127.0.1 80 19993 nc 4 10.0.2.15 100.127.0.1 80 19995 nc 4 10.0.2.15 100.127.0.1 80 root@vagrant:/mnt/bcc# ./tools/tcpconnect.py -P 80,81 PID COMM IP SADDR DADDR DPORT 8725 nc 4 10.0.2.15 100.127.0.1 80 8726 nc 4 10.0.2.15 100.127.0.1 81 8727 nc 4 10.0.2.15 100.127.0.1 80 8728 nc 4 10.0.2.15 100.127.0.1 81 8729 nc 4 10.0.2.15 100.127.0.1 80 Fixes #681
- Loading branch information
5293805
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi,
Please let me know how to solve import bcc error.
5293805
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Murulidhar what does this diff has to do with your issue? You should open an issue with the content of the backtrace if you want people to be able to help you.
5293805
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't know this. So I asked you directly.
Anyways I just now solved it.
Thanks
5293805
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Is there any ways to filter destination address also ? like if I mention destination address then only connections going to that IP only should be displayed.