The z/OS UNIX netstat command syntax

Use the z/OS® UNIX netstat command to display the network configuration and status on a local TCP/IP stack.

Note:
  1. netstat is a synonym for the onetstat command in the z/OS UNIX shell. The onetstat command syntax is the same as that for the netstat command.
  2. Some option modifiers for the z/OS UNIX netstat command are shown below using uppercase letters followed by lowercase letters (for example, SUMmary). The portion of the modifier shown using uppercase letters indicates the minimum abbreviation for the modifier. The modifier used must be entered using all uppercase letters.

Syntax

Read syntax diagramSkip visual syntax diagramnetstat Report OptionTargetOutputFilterCommandTarget
Report Option
Read syntax diagramSkip visual syntax diagram -c -ASERVER12345678 -aAPPLDATA123456789 -bIDLETIME2346 -C -cAPPLDATASERVER123456789 -dPNETIDpnetid*SMC810 -e26 -FDETAIL4 -f -gDETAIL4 -h10 -J -jACTIVESUMmary11 -kSUMmaryPROTOcolprotocol12 -l -n4 -ODETAIL145 -o5
Read syntax diagramSkip visual syntax diagram -qSUMmaryDETAILNEGativeSUMmaryDNS3413 -Rnet addressALL -rADDRTYPEIPV4IPV6DETAILIQDIOPRALLprnameQDIOACCELRADVRSTAT4 -SPROTOcolprotocol14 -s123456 -tDETAIL123451516 -u -VDETAIL1345 -vDVIPAVIPAROUTE -xGRoupCOnnconnidDETAILGRoupDETAIL -?
Command
Read syntax diagramSkip visual syntax diagram -D n
Target
Read syntax diagramSkip visual syntax diagram -p tcpname
Output
Read syntax diagramSkip visual syntax diagram -MLONGSHORT
Filter
Read syntax diagramSkip visual syntax diagram -Bipaddr+ portnum1 -Eclientname2 -Gappldata7 -Hhostname3 -Iipaddripaddr/prefixLenipaddr/subnetmask4 -K intfname10 -Lluname16 -Napplname15 -Pportnum5 -Qdnsipaddr13 -T6 -Usmcid*8 -XNOTTLSPolicyTTLSPolicyCURRentGRoupgroupidSTALE9 -Ypolicyname11
Notes:
  • 1 -B filter is valid only with -A, -a, -c, -s, -t, -O, and -V.
  • 2 -E filter is valid only with -A, -a, -b, -c, -e, -s, and -t.
  • 3 -H filter is valid only with -A, -a, -b, -c, -q, -s, -t, and -V.
  • 4 -I filter is valid only with -A, -a, -b, -c, -F, -g, -n, -O, -q, -r, -s, -t, and -V.
  • 5 -P filter is valid only with -A, -a, -c, -O, -o, -s, -t, and -V.
  • 6 -T filter is valid only with -A, -a, -b, -c, -e, and -s.
  • 7 -G filter is valid only with -A, -a, and -c.
  • 8 -U filter is valid only with -A, -a, -c and -d.
  • 9 -X filter is valid only with -a, and -c.
  • 10 -K filter is valid only with -d and -h.
  • 11 -Y filter is valid only with -j.
  • 12 The valid protocol values are TCP, and UDP.
  • 13 -Q filter is valid only with -q.
  • 14 The valid protocol values are ICMP, IP, TCP, and UDP.
  • 15 -N filter is valid only with -t.
  • 16 -L filter is valid only with -t.