netstat(8)

NAME
netstat - show active network connections

SYNOPSIS
netstat [-f domain]

DESCRIPTION
Netstat is used to display infomation about active communication endpoints in either the unix or inet communication domain or both of them. If invoked without arguments it shows only unix domain sockets. You can specify the domain to deal with with the -f option.

For the unix domain the output of netstat consists of one line for each socket in the system, which contains the following entries:

Proto
    The protocol used by the socket, this can be one of:

    unix
        This is the one and only protocol for unix sockets.

    unknown
        The protocol is unknown, should never happen.

Flags
    These are the flags set on the socket. The output for this entry consists of a space-separated list of tree-letter flag values. Possible flags are:

    ACC The socket is listening for incoming connections. This applies only to stream sockets.

    RCV The socket is shut down for receiving after a call to shutdown(3), ie the socket cannot receive any messages.

    SND The socket is shut down for sending after a call to shutdown(3), ie it is impossible to send messages on the socket.

    MRK If out-of-band data is handled inline, "receiving is at mark", ie all data before the out of band data has been read.

State
    This field is the internal state of the socket, the following values are possible:

    VIRGIN
        The socket has just been created, but has not been assigned a communication domain and type.

    UNCONNECTED
        The socket is not connected to a peer.

    CONNECTING
        The socket is about to connect to another one.

    CONNECTED
        The socket is connected to another one.

    DISONNECTING
        The socket is about to finish the connection to its peer.

    DISCONNECTED
        The socket has finished a connection and is again unconnected.

    UNKNOWN
        This should never happen.

Type
    This is the communication style the socket uses. Possible values are:

    STREAM
        The socket uses connection-oriented byte stream communication, just like pipes do.

    DGRAM
        The socket uses connectionless, unrelyable, datagram oriented communication.

    RAW This is a raw socket.

    RDM Just like DGRAM , except that you can rely on the packets to be delivered successfully.

    SEQPACKET
        This is like RDM , except that the receiver is guaranteed to get the packets in the same order the sender sends them.

    UNKNOWN
        This type should never happen.

Recv-Q
    The size of the next unread message for datagram oriented sockets, and the number of unread bytes for stream oriented ones.

Address
    The local address of the socket, if bind(3) was done on it. This is a filename for the unix domain.

OPTIONS

-f domain
    Display information for active sockets in domain domain, overriding the default domain.

FILES

/dev/unix
    Unix domain information

BUGS
Only unix domain implemented.

AUTHOR
Kay Roemer <roemer@hera.rbi.informatik.uni-frankfurt.de>