Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

netlog(1) [mojave man page]

netlog(1)						    BSD General Commands Manual 						 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 sepa- rated 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 fol- lowing 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 Darwin May 31, 2019 Darwin

Check Out this Related Man Page

SOCKSTAT(1)                                                 BSD General Commands Manual                                                SOCKSTAT(1)

NAME
sockstat -- list open sockets SYNOPSIS
sockstat [-clh] [-p ports] [-P pid|process] [-U uid|user] [-G gid|group] DESCRIPTION
The sockstat command lists open Internet or UNIX domain sockets. The following options are available: -c Show connected sockets. -l Show listening sockets. -h Show a usage summary. -p ports Only show Internet sockets if either the local or foreign port number is on the specified list. The ports argument is a comma- separated list of port numbers and ranges specified as first and last port separated by a dash. -P pid|process Only show sockets of the specified pid|process. The pid|process argument is a process name or pid. -U uid|user Only show sockets of the specified uid|user. The uid|user argument is a username or uid. -G gid|group Only show sockets of the specified gid|group. The gid|group argument is a groupname or gid. If neither -c or -l is specified, sockstat will list both listening and connected sockets. The information listed for each socket is: USER The user who owns the socket. COMMAND The command which holds the socket. PID The process ID of the command which holds the socket. FD The file descriptor number of the socket. PROTO The transport protocol associated with the socket for Internet sockets, or the type of socket (stream or datagram) for UNIX sockets. LOCAL ADDRESS For Internet sockets, this is the address the local end of the socket is bound to (see getsockname(2)). For bound UNIX sockets, it is the socket's filename. For other UNIX sockets, it is a right arrow followed by the endpoint's filename, or ``??'' if the endpoint could not be determined. FOREIGN ADDRESS (Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)). SEE ALSO
netstat(1), protocols(5) HISTORY
The sockstat command appeared in FreeBSD 3.1. AUTHORS
The sockstat command and this manual page were written by Dag-Erling Smorgrav <des@FreeBSD.org>. The sockstat command was ported to Linux by William Pitcock <nenolod@nenolod.net>. BSD May 18, 2008 BSD
Man Page