netlog(1)

NAME
netlog - Log summary of every UDP and TCP socket when the socket is closed.

SYNOPSIS
netlog [-v] [-i interval] [-I iterations] [-t type] [-p process-name|pid] [-c] [-z]

DESCRIPTION
The netlog program logs a summary for each TCP and UDP socket when the socket is closed. A header is printed once. The row items are separated by spaces. Address to hostname lookups are not performed. Sockets that do not send or receive any data are not listed unless the -z option is specified.

OPTIONS
A list of flags and their descriptions:

-v  Verbose output

-i interval
    Report socket statistics periodically

-I iterations
    Used in combination with -i, will make netlog exit after the specified number of iterations.

-t type
    Specify the type of interface. By default, all interfaces will be monitored. Multiple interface types may be specified. The following types are supported:

    wifi
        WiFi interfaces

    wired
        Wired interfaces

    loopback
        Loopback interfaces

    awdl
        Apple Wireless Direct Link interfaces

    expensive
        Interfaces marked as "expensive", for example via hotspot

    undefined
        Cases where the underlying socket is not associated with an interface

    external
        The combination of all defined non-loopback interfaces.

-p process-name|pid
    Select a process for display. A numeric argument identifies a process by its pid. Alternatively a process name may be given, in which case all processes with that name will be displayed. The name must be an exact match for the name displayed by netlog, which may require that the name be truncated, for example launchd.develop instead of launchd.development. This option may be repeated to select multiple processes.

-c  Print details in comma-separated values (CSV) form.

-z  Print details even if there was no data transfer on the socket