Netstat TELnet/-t report

Displays information for TN3270E Telnet server connections.

TSO syntax

Read syntax diagramSkip visual syntax diagram
>>---NETSTAT Telnet--| Modifier |--| Target |--| Output |--| (Filter |---><

Modifier

Read syntax diagramSkip visual syntax diagram
>>-DETAIL------------------------------------------------------><

DETAIL
Displays the logmode and Telnet protocol in use by each connection. If an application user ID was entered on the solicitor panel, it is displayed in the TnUserId field. Otherwise, the TnUserId field is blank.

Target

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.

Output

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.

Filter

Read syntax diagramSkip visual syntax diagram
               .--------------.            
               V              |            
>>-+-APPLname------applname---+--------+-----------------------><
   |         .----------------.        |   
   |         V                |        |   
   +-CLIent------clientname---+--------+   
   +-HOSTName--hostname----------------+   
   |         .-----------------------. |   
   |         V                       | |   
   +-IPAddr----+-ipaddr------------+-+-+   
   |           +-ipaddr/prefixLen--+   |   
   |           '-ipaddr/subnetmask-'   |   
   |         .----------------.        |   
   |         V                |        |   
   +-IPPort----ipaddr+portnum-+--------+   
   |         .------------.            |   
   |         V            |            |   
   +-LUName------luname---+------------+   
   |       .-------------.             |   
   |       V             |             |   
   '-POrt------portnum---+-------------'   

z/OS UNIX syntax

Read syntax diagramSkip visual syntax diagram
>>---netstat -t--| Modifier |--| Target |--| Output |--| Filter |---><

Modifier

Read syntax diagramSkip visual syntax diagram
>>-DETAIL------------------------------------------------------><

DETAIL
Displays the logmode and Telnet protocol in use by each connection. If an application user ID was entered on the solicitor panel, it is displayed in the TnUserId field. Otherwise, the TnUserId field is blank.

Target

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.

Output

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.

Filter

Read syntax diagramSkip visual syntax diagram
          .----------------.            
          V                |            
>>-+- -B----ipaddr+portnum-+--------+--------------------------><
   |      .----------------.        |   
   |      V                |        |   
   +- -E------clientname---+--------+   
   +- -H--hostname------------------+   
   |      .-----------------------. |   
   |      V                       | |   
   +- -I----+-ipaddr------------+-+-+   
   |        +-ipaddr/prefixLen--+   |   
   |        '-ipaddr/subnetmask-'   |   
   |      .------------.            |   
   |      V            |            |   
   +- -L------luname---+------------+   
   |      .--------------.          |   
   |      V              |          |   
   +- -N------applname---+----------+   
   |      .-------------.           |   
   |      V             |           |   
   '- -P------portnum---+-----------'   

Filter description

APPLname applname
Filter the output of the TELnet/-t report using the specified VTAM® application name applname. You can enter up to six filter values and each specified value can be up to eight characters long.
CLIent/-E clientname
Filter the output of the TELnet/-t report using the specified client name clientname. You can enter up to six filter values and each specified value can be up to eight characters long.
HOSTName/-H hostname
Filter the output of the TELnet/-t report using the specified host name hostname. You can enter one filter value at a time and the specified value can be up to 255 characters long.

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.

Restrictions:
  1. The HOSTName/-H filter does not support wildcard characters.
  2. Using HOSTName/-H filter might cause delays in the output due to resolution of the hostname value, depending upon resolver and DNS configuration.
IPAddr/-I ipaddrIPAddr/-I ipaddr/prefixlengthIPAddr/-I ipaddr/subnetmask
Filter the report output using the specified IP address ipaddr, ipaddr/prefixlength, or ipaddr/subnetmask. You can enter up to six filter values. Each specified IPv4 ipaddr value can be up to 15 characters in length and each selected IPv6 ipaddr value can be up to 45 characters in length.
ipaddr
Filter the output of the TELnet/-t report using the specified IP address ipaddr. For IPv4 addresses, the default subnet mask of 255.255.255.255 is used. For IPv6 addresses, the default prefixlength of 128 is used.
ipaddr/prefixlength
Filter the output of the TELnet/-t report using the specified IP address and prefix length ipaddr/prefixlength. For an IPv4 address, the prefix length range is 1 – 32. For an IPv6 address, the prefix length range is 1 – 128.
ipaddr/subnetmask
Filter the output of the TELnet/-t report using the specified IP address and subnet mask ipaddr/subnetmask. The IP address ipaddr in this format must be an IPv4 IP address.
Guidelines:
  1. The filter value ipaddr is the remote IP address.
  2. For an IPv6-enabled stack:
    • Both IPv4 and IPv6 ipaddr values are accepted and can be mixed on the IPAddr/-I option.
    • An IPv4-mapped IPv6 address is accepted as a valid ipaddr value and usually provides the same result as its IPv4 address.
Restrictions:
  1. The filter value for an IPv6 address does not support wildcard characters.
  2. For an IPv4-only stack, only IPv4 ipaddr values are accepted.
IPPort/-B ipaddr+portnum
Filter the report output of the TELnet/-t report using the specified IP address and port number. You can enter up to six filter values. Each specified IPv4 ipaddr value can be up to 15 characters in length, denoting a single IPv4 IP address; each specified IPv6 ipaddr value can be up to 45 characters in length, denoting a single IPv6 IP address. Valid portnum values are in the range 0 – 65 535. The filter values ipaddr and portnum will match any combination of the local and remote IP address and local and remote port.
Guidelines:
  • The filter value ipaddr can be either the local or remote IP address.
  • For an IPv6-enabled stack, the following apply:
    • Both IPv4 and IPv6 ipaddr values are accepted and can be mixed on the IPPort/-B option.
    • An IPv4-mapped IPv6 address is accepted as a valid ipaddr value and usually provides the same result as the IPv4 address.
Restrictions:
  • The ipaddr value in the IPPort/-B filter does not support wildcard characters.
  • For an IPv4-only stack, only IPv4 ipaddr values are accepted.
  • An entry is returned only when both the ipaddr and portnum values match.
LUName luname
Filter the output of the TELnet/-t report using the specified LU name luname. You can enter up to six filter values and each specified value can be up to eight characters long.
POrt/-P portnum
Filter the output of the TELnet/-t report using the specified port number portnum. You can enter up to six filter values.

Except for POrt/-P, and HOSTname/-H, the filter value 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, you must specify the value in the ipaddr format. The wildcard character is not accepted for the ipaddr/prefixlen or ipaddr/subnetmask format of IPAddr/-I values.

When you use 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 quotation marks. For example, to use an asterisk (*) in the IP address, 10.*.0.0 for the -I filter, issue the command as: netstat -t -I '10.*.0.0'.

Command syntax examples

From TSO environment

NETSTAT TELNET
   Display the status of the internal Telnet server connections in the default 
   TCP/IP stack. 
NETSTAT TELNET TCP TCPCS6
   Display the status of the internal Telnet server connections in TCPCS6 stack.
NETSTAT TELNET TCP TCPCS8 (IPADDR 9.43.1.1 9.43.2.2
   Display the status of the internal Telnet server connetctions in TCPCS8 stack 
   whose foreign IP addresses match the specified filter IP address values.
NETSTAT TELNET (PORT 2222 6666 88
   Display the status of the internal Telnet server connections in the default 
   TCP/IP stack whose foreign ports match the specified filter port numbers.

From UNIX shell environment

   netstat -t
   netstat -t -p tcpcs6 
   netstat -t -p tcpcs6 -I 9.43.1.1 9.43.2.2
   netstat -t -P 2222 6666 88

Report examples

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.

Not IPv6 enabled (SHORT format)

NETSTAT TELNET

MVS TCP/IP NETSTAT CS V2R1       TCPIP NAME: TCPCS            17:41:00       
Internal Telnet Server Status:                                               
Conn     Foreign Socket         State    BytesIn  BytesOut ApplName LuName   
----     --------------         -----    -------  -------- -------- ------   
000000F6 201.2.10.11..1034      Establsh 00000715 00007648 TSO10002 TCPM1001 
000000F9 201.2.10.12..1035      Establsh 00000222 00005930 TSO10004 TCPM1002 
000000FE 9.27.11.182..4665      Establsh 00000091 00000623 TSO10003 TCPM1003 
NETSTAT TELNET DETAIL

MVS TCP/IP NETSTAT CS V2R1       TCPIP NAME: TCPCS            17:41:00       
Internal Telnet Server Status:                                               
Conn     Foreign Socket         State    BytesIn  BytesOut ApplName LuName   
----     --------------         -----    -------  -------- -------- ------   
000000F6 201.2.10.11..1034      Establsh 00000715 00007648 TSO10002 TCPM1001 
  ModeName: NSX32702  TnProto:  TN3270    TnUserId:                          
000000F9 201.2.10.12..1035      Establsh 00000222 00005930 TSO10004 TCPM1002 
  ModeName: NSX32702  TnProto:  TN3270    TnUserId:                          
000000FE 9.27.11.182..4665      Establsh 00000091 00000623 TSO10003 TCPM1003 
  ModeName: INTERACT  TnProto:  LINEMODE  TnUserId:       
Note: For NETSTAT TELnet display, the BytesOut and BytesIn counts are in two forms:
nnnnnnnn
Number range 0 – 99 999 999
nnnnnnnK
Number range 100 000 000 – 4 294 967 294

where K = nnnnnnn x 1000

IPv6 enabled or request for LONG format

NETSTAT TELNET

MVS TCP/IP NETSTAT CS V2R1       TCPIP Name: TCPCS           11:11:25        
Internal Telnet Server Status:                                               
Conn     State    BytesIn    BytesOut   ApplName LuName                      
----     -----    -------    --------   -------- ------                      
000000F6 Establsh 0000000715 0000007648 TSO10002 TCPM1001                    
  Foreign socket: 201.2.10.11..1034                                          
000000F9 Establsh 0000000222 0000005930 TSO10004 TCPM1002                    
  Foreign socket: 201.2.10.12..1035                                          
000000FE Establsh 0000000091 0000000623 TSO10003 TCPM1003                    
  Foreign socket: 9.27.11.182..4665                                          
NETSTAT TELNET DETAIL

MVS TCP/IP NETSTAT CS V2R1       TCPIP Name: TCPCS           11:11:25        
Internal Telnet Server Status:                                               
Conn     State    BytesIn    BytesOut   ApplName LuName                      
----     -----    -------    --------   -------- ------                      
000000F6 Establsh 0000000715 0000007648 TSO10002 TCPM1001
  Foreign socket: 201.2.10.11..1034
  ModeName: NSX32702  TnProto:  TN3270    TnUserId:
000000F9 Establsh 0000000222 0000005930 TSO10004 TCPM1002
  Foreign socket: 201.2.10.12..1035                                          
  ModeName: NSX32702  TnProto:  TN3270    TnUserId:
000000FE Establsh 0000000091 0000000623 TSO10003 TCPM1003                    
  Foreign socket: 9.27.11.182..4665                                          
  ModeName: INTERACT  TnProto:  LINEMODE  TnUserId:         
For the NETSTAT TELnet display, the BytesOut and BytesIn counts are in one of the following five forms:
nnnnnnnnnn
A number in the range 0 – 9 999 999 999
nnnnnnnnnK
A number in the range 10 000 000 000 – 9 999 999 999 499 (K = nnnnnnnnnn x 1000)
nnnnnnnnnM
A number in the range 9 999 999 999 500 – 9 999 999 999 499 999 (M = nnnnnnnnnn x 1 000 000)
nnnnnnnnnG
A number in the range 9 999 999 999 500 000 – 9 999 999 999 499 999 999 (G = nnnnnnnnnn x 1 000 000 000)
nnnnnnnnnT
A number in the range 9 999 999 999 500 000 000 – 9 999 999 999 499 999 999 999 (T = nnnnnnnnnn x 1 000 000 000 000)

Report field descriptions

Conn
The connection ID as it is known to TCP/IP. See Client ID or Connection Number information in Netstat report general concept for a detailed description.
Foreign Socket
See the Foreign Socket information in Netstat report general concept for a detailed description.
State
The connection state as it is known to TCP/IP. See the TCP connection status information in Netstat report general concept for a detailed description.
BytesIn
Total bytes of data received from the client.
BytesOut
Total bytes of data sent to the client.
ApplName
The name of the application in session with the client.
LuName
The LU name selected by Telnet to represent the client.
ModeName
The SNA logmode used for this session.
InProto
The Telnet connection protocol used.
TN3270
The connection has negotiated to a TN3270 Telnet protocol.
TN3270E
The connection has negotiated to a TN3270E Telnet protocol.
TCLMODE
The connection has negotiated to a linemode Telnet protocol.
TnUserId
The user ID used specified on the solicitor panel in response to the Telnet request for user ID/password because of Restrictappl being coded. If an application user ID was entered on the solicitor panel, it is displayed in the TnUserId field. Otherwise, the TnUserId field is blank.