logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

bindsnoop - Trace bind() system calls.

Author

       Pavel Dubovitsky

Description

       bindsnoop reports socket options set before the bind call that would impact this system call behavior.

Examples:

              Trace all IPv4 and IPv6 bind()s

              bindsnoop

              Include timestamps

              bindsnoop-t

              Trace PID 181

              bindsnoop-p181

              Trace port 80

              bindsnoop-P80

              Trace port 80 and 81

              bindsnoop-P80,81

              Include UID

              bindsnoop-U

              Trace UID 1000

              bindsnoop-u1000

              Report bind errors

              bindsnoop-E

              Count bind per src ip

              bindsnoop--count

       Trace IPv4 and IPv6 bind system calls and report socket options that would impact bind call behavior:

              SOL_IP IP_FREEBIND              F....

              SOL_IP IP_TRANSPARENT           .T...

              SOL_IP IP_BIND_ADDRESS_NO_PORT  ..N..

              SOL_SOCKET SO_REUSEADDR         ...R.

              SOL_SOCKET SO_REUSEPORT         ....r

              SO_BINDTODEVICE interface is reported as "IF" index

Name

       bindsnoop - Trace bind() system calls.

Options:

              Show help message and exit:

              -h,--help

              Include timestamp on output:

              -t,--timestamp

              Wider columns (fit IPv6):

              -w,--wide

              Trace this PID only:

              -pPID,--pidPID

              Comma-separated list of ports to trace:

              -PPORT,--portPORT

              Trace cgroups in this BPF map:

              --cgroupmapMAP

              Trace mount namespaces in this BPF map:

              --mntnsmapMNTNSMAP

              Include errors in the output:

              -E,--errors

              Include UID on output:

              -U,--print-uid

              Trace this UID only:

              -uUID,--uidUID

              Count binds per src ip and port:

              --count

Os

       Linux

Requirements

       CONFIG_BPF and bcc.

See Also

tcpaccept(8)

                                                12 February 2020                                    bindsnoop(8)

Source

       This is from bcc.

              https://github.com/iovisor/bcc

       Also look in the bcc distribution for a companion _examples.txt file containing  example  usage,  output,
       and commentary for this tool.

Stability

       Unstable - in development.

Synopsis

bindsnoop[-h][-w][-t][-pPID][-PPORT][-E][-U][-uUID][--count][--cgroupmapMAP][--mntnsmapMNTNSMAP]

See Also