Displays byte-count information for each active TCP connection and UDP socket.
Provide the report for a specific TCP/IP address space by using TCp tcpname. See The Netstat command target for more information about the TCp parameter.
The default output option displays the output on the user's terminal. For other options, see The TSO NETSTAT command syntax or Netstat command output.
Provide the report for a specific TCP/IP address space by using -p tcpname. See The Netstat command target for more information about the TCp parameter.
The default output option displays the output to z/OS UNIX shell stdout. For other options, see The z/OS UNIX netstat command syntax or Netstat command output.
Result: At the end of the report, Netstat displays the host name that the resolver used for the resolution and the list of IP addresses returned from the resolver that it used as filters.
The filter value for CLIent/-E and IPAddr/-I can be a complete string or a partial string using wildcard characters. A wildcard character can be an asterisk (*), which matches a null string or any character or character string, at the same position. A wildcard character can be a question mark (?), which matches any single character at the same position. For example, a string "searchee" matches with "*ar?he*", but the string "searhee" does not match with "*ar?he*". If you want to use the wildcard character on the IPAddr/-I filter, specify the value in the ipaddr format. The wildcard character is not accepted for the ipaddr/subnetmask or ipaddr/prefixlen format of IPAddr/-I values.
When using the z/OS UNIX netstat/onetstat command in a z/OS UNIX shell environment, take care if you use a z/OS UNIX MVS™ special character in a character string. It might cause an unpredictable result. To be safe, if you want to use a z/OS UNIX MVS special character in a character string, surround the character string with single (') or double (") quotation marks. For example, to use an asterisk (*) in the IP address, 10.*.0.0 for the -I filter, issue the command as: netstat -b -I '10.*.0.0' or netstat -b -I "10.*.0.0".
NETSTAT BYTEINFO
Displays the byte-count information about each TCP connection and UDP socket in the
default TCP/IP stack.
NETSTAT BYTEINFO TCP TCPCS6
Displays the byte-count information about each TCP connection and UDP socket in
TCPCS6 stack.
NETSTAT BYTEINFO TCP TCPCS8 (IPADDR 9.43.1.1 9.43.2.2
Displays the byte-count information about each TCP connection and UDP socket in
TCPCS8 stack whose foreign IP addresses match the specified filter IP address values.
netstat -b
netstat -b -p tcpcs6
netstat -b -p tcpcs6 -I 9.43.1.1 9.43.2.2
The following examples are generated by using TSO NETSTAT command. Using the z/OS UNIX netstat command displays the data in the same format as the TSO NETSTAT command.
NETSTAT BYTEINFO
MVS TCP/IP NETSTAT CS V2R1 TCPIP Name: TCPCS 17:19:18
06/06/2003 MVS TCP/IP Real Time Network Monitor
User Id B Out B In L Port Foreign Socket State
------- ----- ---- ------ -------------- -----
FTPD1 0000000000 0000000000 00021 0.0.0.0..0 Listen
FTPD1 0000001062 0000000480 00021 9.67.115.5..1026 Establsh
FTPD1 0000000200 0000000028 00021 9.27.13.21..3711 Establsh
TCPCS 0000000000 0000000000 00023 0.0.0.0..0 Listen
TCPCS 0000000480 0000001062 00023 9.27.11.182..4886 Establsh
APPV4 0000000200 0000000100 02049 9.42.103.99..1234 UDP
SYSLOGD1 0000000000 0000000000 00514 *..* UDP
Connections displayed: 6
NETSTAT BYTEINFO IDLETIME
MVS TCP/IP NETSTAT CS V2R1 TCPIP NAME: TCPCS 17:40:44
06/06/2003 MVS TCP/IP Real Time Network Monitor
User Id B Out B In LPort Foreign Socket State IdleTime
-------- ------- ------- ----- ---------------------- -------- --------
FTPD1 0000000 0000000 00021 0.0.0.0..0 Listen 00:03:31
FTPD1 0001062 0000480 00021 9.67.115.5..1026 Establsh 00:03:45
FTPD1 0000200 0000028 00021 9.27.13.21..3711 Establsh 00:03:57
TCPCS 0000000 0000000 00023 0.0.0.0..0 Listen 00:01:02
TCPCS 0000480 0001062 00023 9.27.11.182..4886 Establsh 00:04:00
APPV4 0000200 0000100 02049 9.42.103.99..1234 UDP 00:03:01
SYSLOGD1 0000000 0000000 00514 *..* UDP 00:02:13
Connections displayed: 6
NETSTAT BYTEINFO
MVS TCP/IP NETSTAT CS V2R1 TCPIP Name: TCPCS 16:49:32
06/06/2003 MVS TCP/IP Real Time Network Monitor
User Id BytesOut BytesIn LPort State
------- -------- ------- ----- -----
FTPD1 00000000000000000000 00000000000000000000 00021 Listen
Foreign Socket: ::..0
FTPD1 00000000000000000217 00000000000000000025 00021 Establsh
Foreign Socket: ::ffff:9.67.115.65..1026
FTPD1 00000000000000000438 00000000000000000061 00021 Establsh
Foreign Socket: 2001:0db8::9:67:115:65..1027
TCPCS 00000000000000000000 00000000000000000000 00023 Listen
Foreign Socket: 0.0.0.0..0
TCPCS 00000000000000000480 00000000000000001062 00023 Establsh
Foreign Socket: 9.27.11.182..4665
USER3 00000000000000000000 00000000000000097865 01079 Establsh
Foreign Socket: 2001:0db8::9:67:115:65..21
USER6 00000000000000000061 00000000000000000438 01027 Establsh
Foreign Socket: 9.37.65.146..21
APPV4 00000000000000000200 00000000000000000100 02049 UDP
Foreign Socket: 9.42.103.99..1234
APPV6 00000000000000000200 00000000000000000100 02050 UDP
Foreign Socket: 12ab::1..1235
SYSLOGD1 00000000000000000000 00000000000000000000 00529 UDP
Foreign Socket: *..*
Connections displayed: 8
NETSTAT BYTEINFO IDLETIME
MVS TCP/IP NETSTAT CS V2R1 TCPIP Name: TCPCS 16:49:32
06/06/2003 MVS TCP/IP Real Time Network Monitor
User Id BytesOut BytesIn LPort State
------- -------- ------- ----- -----
FTPD1 00000000000000000000 00000000000000000000 00021 Listen
Foreign Socket: ::..0
FTPD1 00000000000000000217 00000000000000000025 00021 Establsh
Foreign Socket: ::ffff:9.67.115.65..1026
FTPD1 00000000000000000438 00000000000000000061 00021 Establsh
Foreign Socket: 2001:0db8::9:67:115:65..1027
TCPCS 00000000000000000000 00000000000000000000 00023 Listen
Foreign Socket: 0.0.0.0..0
TCPCS 00000000000000000480 00000000000000001062 00023 Establsh
Foreign Socket: 9.27.11.182..4665
USER3 00000000000000000000 00000000000000097865 01079 Establsh
Foreign Socket: 2001:0db8::9:67:115:65..21
USER6 00000000000000000061 00000000000000000438 01027 Establsh
Foreign Socket: 9.37.65.146..21
APPV4 000000000000000200 000000000000000100 02049 UDP 00:03:01
Foreign Socket: 9.42.103.99..1234
APPV6 000000000000000200 000000000000000100 02050 UDP 00:20:02
Foreign Socket: 12ab::1..1235
SYSLOGD1 00000000000000000000 00000000000000000000 00529 UDP
Foreign Socket: *..*
Connections displayed: 8