Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vmstat(1)

netstat(1)  —  Commands

OSF  —  Environment_Note_Added

NAME

netstat − Displays network statistics

SYNOPSIS

netstat [-Aan] [-f address_family] [-p protocol] [system] [core] [interval]

netstat [-imnrsutdH] [-f address_family] [-p protocol] [system] [core] [interval]

netstat [-ntd] [-I interface] [system] [core] [interval]

The netstat command displays network-related data in various formats. 

FLAGS

-aDisplays the state of sockets related to the Internet protocol.  Includes sockets for processes such as servers that are currently listening at a socket but are otherwise inactive. 

-ADisplays the address of any protocol control blocks associated with sockets.  Typically, this flag is used for debugging. 

-dDisplays the number of dropped packets; for use with the -Iinterface or -i flags.  You can also specify an interval argument (in seconds). 

-f address_family
Limits reports to the specified address family. The address families that can be specified might include the following:

inetSpecifies reports of the AF_INET family, if present in the kernel. 

unixSpecifies reports of the AF_UNIX family, if present in the kernel. 

nsSpecifies reports of the AF_NS, if present in the kernel. 

allLists information about all address families in the system. 

-HDisplays the current ARP table (behaves like arp -a). 

-iDisplays the state of configured interfaces.  (Interfaces that are statically configured into the system, but not located at system start, are not shown.) 

-Iinterface
Displays information about the specified interface. An interval argument must be entered when you use the -I flag. 

-mDisplays information about memory allocated to data structures associated with network operations. 

-nDisplays network address in numerical format.  When this flag is not specified, the address is displayed as hostname and port number.  This flag can be used with any of the display formats. 

-pprotocol
Displays statistics for protocol, which you can specify as a well known name or an alias.  Supported protocol names and their aliases are listed in /etc/protocols.  A null listing (0) means that there is no data to report.  If routines to report statistics for a specified protocol are not implemented on this system, netstat reports that the protocol is unknown. 

-rDisplays the host’s routing tables.  When used with the -s flag, shows the host’s routing statistics instead of routing tables. 

-sDisplays statistics for each protocol. 

-tDisplays timer information; for use with the -I[interface] or -i flags. 

-uDisplays information about domain sockets (UNIX domain). 

DESCRIPTION

The interval argument specifies in seconds the interval for updating and displaying information.  The first line of the display shows cumulative statistics; subsequent lines show statistics recorded during interval. 

The system and core arguments cause netstat to derive statistics from the file core based on kernel file system.  The default values for system and core are /vmunix and /dev/kmem, respectively. 

Default Display

When used without flags, the netstat command displays a list of active sockets for each protocol.  The default display shows the following items:

       •Local and remote addresses

       •Send and receive queue sizes (in bytes)

       •Protocol

       •State

Address formats are of the form host.port or network.port if a socket’s address specifies a network but no specific host address.  The host and network address are displayed symbolically unless -n is specified. 

Interface Display

The network interface display format provides a table of cumulative statistics for the following:

       •Interface name

       •Maximum Transmission Unit (MTU)

       •Network Address

       •Packets received (Ipkts)

       •Packets received in error (Ierrs)

       •Packets transferred (Opkts)

       •Outgoing packets in error (Oerrs)

       •Collisions Note that the collisions item has different meanings for different network interfaces.

       •Drops (optional with -d)

       •Timers (optional with -t)

Routing Table Display

A route consists of a destination host or network and a gateway to use when forwarding packets.  Direct routes are created automatically for each interface attached to the local host when you issue the ifconfig command.  Routes can be modified automatically in response to the prevailing condition of the network. 

The routing-table display format indicates available routes and the status of each in the following fields:

FlagsDisplays the state of the route as one or more of the following:

UUp, or available. 

GThis route is to a gateway. 

HThis route is to a host

DThis route was dynamically created by a redirect. 

MThis route was modified by a redirect. 

refcntGives the current number of active uses for the route.  Connection-oriented protocols hold on to a single route for the duration of a connection; connectionless protocols obtain routes in the process of sending to a destination. 

useProvides a count of the number of packets sent using the route. 

interface
Indicates the network interface used for the route.

EXAMPLES

     1.To show the state of the configured interfaces, enter:

$ netstat -i

     2.To show the routing tables, enter:

$ netstat -r

The resulting display looks like the following:

Routing Tables
DestinationGatewayFlagsRefsUseInterface
Netmasks:
Inet255.255.255.0
 Route Tree for Protocol Family 2:
default555.555.5.5UG1338618se0
localhost555.555.5.4UH229lo0
ethernet555.555.5.3U9866760se0

(Output may be formatted differently on your system.)

     3.To produce the default display for network connections, enter:

netstat

The resulting display might include the following headings:

Active Internet connections
Proto Recv-Q Send-Q Local AddressForeign Address(state)

ENVIRONMENT NOTES

This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation. 

Digital Extensions

The netstat command includes the following flag: [-I interface -s]

This flag displays the DNA Ethernet Data Link Layer counters for an Ethernet interface.  It displays the DNA FDDI Data Link Layer counters, adapter’s status and characteristics for an FDDI interface. 

RELATED INFORMATION

Commands:  vmstat(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026