[JM:01565] [POST:DP] iproute2 ss.8

Back to archive index
Yuichi SATO ysato****@ybb*****
2019年 7月 26日 (金) 21:58:51 JST


<STATUS>
stat: DP
ppkg: iproute2
page: ss.8
date: 2019/07/26
mail: ysato****@ybb*****
name: SATO Yuichi
</STATUS>

.\"
.\" Japanese Version Copyright (c) 2019 Yuichi SATO
.\"         all rights reserved.
.\" Translated Mon Jul 15 11:06:21 JST 2019
.\"         by Yuichi SATO <ysato****@ybb*****>
.\"
.TH SS 8
.\"O .SH NAME
.SH 名前
.\"O ss \- another utility to investigate sockets
ss \- ソケットを調査するもう 1 つのユーティリティ
.\"O .SH SYNOPSIS
.SH 書式
.B ss
.RI [ options ] " [ FILTER ]"
.\"O .SH DESCRIPTION
.SH 説明
.\"O .B ss
.\"O is used to dump socket statistics. It allows showing information similar
.\"O to
.\"O .IR netstat .
.B ss
はソケットの統計 (socket statistics) をダンプするのに使われる。
これは
.I netstat
と同様の情報を表示することができる。
.\"O It can display more TCP and state information than other tools.
このツールは、他のツールより多くの TCP と状態の情報を表示できる。

.\"O .SH OPTIONS
.SH オプション
.\"O When no option is used ss displays a list of open non-listening
.\"O sockets (e.g. TCP/UNIX/UDP) that have established connection.
オプションが指定されない場合、ss は接続が確立された
オープンされてリッスンしていないソケット (例えば、TCP/UNIX/UDP) のリストを表示する。
.TP
.B \-h, \-\-help
.\"O Show summary of options.
オプションのサマリーを表示する。
.TP
.B \-V, \-\-version
.\"O Output version information.
バージョン情報を出力する。
.TP
.B \-H, \-\-no-header
.\"O Suppress header line.
ヘッダ行の出力を抑止する。
.TP
.B \-n, \-\-numeric
.\"O Do not try to resolve service names.
サービス名の解決を行わない。
.TP
.B \-r, \-\-resolve
.\"O Try to resolve numeric address/ports.
数値のアドレス/ポートの解決を行う。
.TP
.B \-a, \-\-all
.\"O Display both listening and non-listening (for TCP this means
.\"O established connections) sockets.
リッスンしているソケットと、リッスンしていないソケット
(TCP では接続を確立したことを意味する) の両方を表示する。
.TP
.B \-l, \-\-listening
.\"O Display only listening sockets (these are omitted by default).
リッスンしているソケットのみを表示する (これはデフォルトでは省略される)。
.TP
.B \-o, \-\-options
.\"O Show timer information. For TCP protocol, the output format is:
タイマー情報を表示する。
TCP プロトコルでは出力フォーマットは以下のとおり。
.RS
.P
timer:(<timer_name>,<expire_time>,<retrans>)
.P
.TP
.B <timer_name>
.\"O the name of the timer, there are five kind of timer names:
タイマーの名前。
5 種類のタイマー名がある。
.RS
.P
.B on
.\"O : means one of these timers: TCP retrans timer, TCP early retrans
.\"O timer and tail loss probe timer
: 以下の 3 つのいずれかのタイマー: TCP retrans タイマー,
TCP early retrans タイマー、tail loss probe タイマー
.P
.\"O .BR keepalive ": tcp keep alive timer"
.BR keepalive ": tcp keep alive タイマー"
.P
.\"O .BR timewait ": timewait stage timer"
.BR timewait ": timewait stage タイマー"
.P
.\"O .BR persist ": zero window probe timer"
.BR persist ": zero window probe タイマー"
.P
.\"O .BR unknown ": none of the above timers"
.BR unknown ": 上記のどのタイマーでもない"
.RE
.TP
.B <expire_time>
.\"O how long time the timer will expire
タイマーが期限切れするまでの時間
.P
.TP
.B <retrans>
.\"O how many times the retransmission occured
再送信が行われた回数。
.RE
.TP
.B \-e, \-\-extended
.\"O Show detailed socket information. The output format is:
詳細なソケット情報を表示する。
出力フォーマットは以下のとおり。
.RS
.P
uid:<uid_number> ino:<inode_number> sk:<cookie>
.P
.TP
.B <uid_number>
.\"O the user id the socket belongs to
ソケットが所属するユーザ ID
.P
.TP
.B <inode_number>
.\"O the socket's inode number in VFS
VFS 上のソケットの inode 番号
.P
.TP
.B <cookie>
.\"O an uuid of the socket
ソケットの UUID
.RE
.TP
.B \-m, \-\-memory
.\"O Show socket memory usage. The output format is:
ソケットのメモリ使用情報。
出力フォーマットは以下のとおり。
.RS
.P
skmem:(r<rmem_alloc>,rb<rcv_buf>,t<wmem_alloc>,tb<snd_buf>,
.br
.RS
.RS
f<fwd_alloc>,w<wmem_queued>,
.RE
.RE
.br
.RS
.RS
o<opt_mem>,bl<back_log>)
.RE
.RE
.P
.TP
.B <rmem_alloc>
.\"O the memory allocated for receiving packet
受信パケットのために確保されたメモリ。
.P
.TP
.B <rcv_buf>
.\"O the total memory can be allocated for receiving packet
受信パケットのために確保可能な総メモリ。
.P
.TP
.B <wmem_alloc>
.\"O the memory used for sending packet (which has been sent to layer 3)
(レイヤー 3 に送信される) 送信パケットに使われるメモリ。
.P
.TP
.B <snd_buf>
.\"O the total memory can be allocated for sending packet
送信パケットのために確保可能な総メモリ。
.P
.TP
.B <fwd_alloc>
.\"O the memory allocated by the socket as cache, but not used for
.\"O receiving/sending packet yet. If need memory to send/receive packet,
.\"O the memory in this cache will be used before allocate additional
.\"O memory.
キャッシュとしてソケットのために確保されたが、
送受信パケットにまだ使われていないメモリ。
送受信パケットにメモリが必要な場合、追加のメモリを確保する
前に、このキャッシュのメモリが使われる。
.P
.TP
.B <wmem_queued>
.\"O The memory allocated for sending packet (which has not been sent to layer 3)
(レイヤー 3 に送信されない) 送信パケットのために確保されたメモリ。
.P
.TP
.B <ropt_mem>
.\"O The memory used for storing socket option, e.g., the key for TCP MD5 signature
ソケットオプションを格納するために使われるメモリ。
例えば、TCP MD5 シグネチャのキー。
.P
.TP
.B <back_log>
.\"O The memory used for the sk backlog queue. On a process context, if the
.\"O process is receiving packet, and a new packet is received, it will be
.\"O put into the sk backlog queue, so it can be received by the process
.\"O immediately
sk バックログキューに使われるメモリ。
プロセスコンテキストでは、プロセスがパケットを
受信している時に、
新しいパケットが受信すると、sk バックログキューに入れられる。
これにより、プロセスは即座にパケットを受信できる。
.RE
.TP
.B \-p, \-\-processes
.\"O Show process using socket.
ソケットを使っているプロセスを表示する。
.TP
.B \-i, \-\-info
.\"O Show internal TCP information. Below fields may appear:
内部 TCP 情報を表示する。
以下のフィールドが表示される。
.RS
.P
.TP
.B ts
.\"O show string "ts" if the timestamp option is set
タイムスタンプオプションが設定されている場合、文字列 "ts" が表示される。
.P
.TP
.B sack
.\"O show string "sack" if the sack option is set
sack オプションが設定されている場合、文字列 "sack" が表示される。
.P
.TP
.B ecn
.\"O show string "ecn" if the explicit congestion notification option is set
明示的な混雑通知 (explicit congestion notification) オプションが設定されている場合、
文字列 "ecn" が表示される。
.P
.TP
.B ecnseen
.\"O show string "ecnseen" if the saw ecn flag is found in received packets
受信パケットに saw ecn フラグが設定されている場合、
文字列 "ecnseen" が表示される。
.P
.TP
.B fastopen
.\"O show string "fastopen" if the fastopen option is set
fastopen オプションが設定されている場合、
文字列 "fastopen" が表示される。
.P
.TP
.B cong_alg
.\"O the congestion algorithm name, the default congestion algorithm is "cubic"
congestion アルゴリズム名。
デフォルトの congestion アルゴリズム名は、"cubic" である。
.P
.TP
.B wscale:<snd_wscale>:<rcv_wscale>
.\"O if window scale option is used, this field shows the send scale factor
.\"O and receive scale factor
ウィンドウスケールオプションが使われている場合、
このフィールドには、送信スケールファクターと
受信スケールファクターが表示される。
.P
.TP
.B rto:<icsk_rto>
.\"O tcp re-transmission timeout value, the unit is millisecond
tcp 再送信のタイムアウト値。単位はミリ秒。
.P
.TP
.B backoff:<icsk_backoff>
.\"O used for exponential backoff re-transmission, the actual
.\"O re-transmission timeout value is icsk_rto << icsk_backoff
指数関数的に増える再送信タイムアウト (exponential backoff re-transmission)
として使われる。
実際の再送信タイムアウト値は、icsk_rto << icsk_backoff である。
.P
.TP
.B rtt:<rtt>/<rttvar>
.\"O rtt is the average round trip time, rttvar is the mean deviation of
.\"O rtt, their units are millisecond
rtt はラウンドトリップ時間の平均値であり、rttvar は rrt の平均偏差である。
単位はミリ秒。
.P
.TP
.B ato:<ato>
.\"O ack timeout, unit is millisecond, used for delay ack mode
ack タイムアウト。
単位はミリ秒。
遅延 ack モードで使われる。
.P
.TP
.B mss:<mss>
.\"O max segment size
最大セグメントサイズ
.P
.TP
.B cwnd:<cwnd>
.\"O congestion window size
congestion ウインドウサイズ
.P
.TP
.B pmtu:<pmtu>
.\"O path MTU value
パス MTU 値
.P
.TP
.B ssthresh:<ssthresh>
.\"O tcp congestion window slow start threshold
tcp congestion ウィンドウのスロースタートのしきい値
.P
.TP
.B bytes_acked:<bytes_acked>
.\"O bytes acked
ack されたバイト数
.P
.TP
.B bytes_received:<bytes_received>
.\"O bytes received
受信バイト数
.P
.TP
.B segs_out:<segs_out>
.\"O segments sent out
送信セグメント数
.P
.TP
.B segs_in:<segs_in>
.\"O segments received
受信セグメント数
.P
.TP
.B send <send_bps>bps
.\"O egress bps
送信 bps
.P
.TP
.B lastsnd:<lastsnd>
.\"O how long time since the last packet sent, the unit is millisecond
最後のパケットを送信してからの時間。単位はミリ秒。
.P
.TP
.B lastrcv:<lastrcv>
.\"O how long time since the last packet received, the unit is millisecond
最後のパケットを受信してからの時間。単位はミリ秒。
.P
.TP
.B lastack:<lastack>
.\"O how long time since the last ack received, the unit is millisecond
最後の ack を受信してからの時間。単位はミリ秒。
.P
.TP
.B pacing_rate <pacing_rate>bps/<max_pacing_rate>bps
.\"O the pacing rate and max pacing rate
ペーシングレート (pacing rate) と最大ペーシングレート
.P
.TP
.B rcv_space:<rcv_space>
.\"O a helper variable for TCP internal auto tuning socket receive buffer
TCP 内部チューニングソケットの受信バッファのヘルパー変数
.RE
.TP
.B \-\-tos
.\"O Show ToS and priority information. Below fields may appear:
ToS と優先度情報を表示する。
以下のフィールドが表示される。
.RS
.P
.TP
.B tos
.\"O IPv4 Type-of-Service byte
IPv4 Type-of-Service バイト
.P
.TP
.B tclass
.\"O IPv6 Traffic Class byte
IPv6 Traffic Class バイト
.P
.TP
.B class_id
.\"O Class id set by net_cls cgroup. If class is zero this shows priority
.\"O set by SO_PRIORITY.
net_cls cgroup で設定されるクラス ID。
クラスが 0 の場合、SO_PRIORITY で設定される優先度が表示される。
.RE
.TP
.B \-K, \-\-kill
.\"O Attempts to forcibly close sockets. This option displays sockets that are
.\"O successfully closed and silently skips sockets that the kernel does not support
.\"O closing. It supports IPv4 and IPv6 sockets only.
ソケットを強制的にクローズする。
このオプションは、クローズに成功したソケットと、
カーネルがソケットのクローズをサポートしておらず、
暗黙のうちにスキップされたソケットを表示する。
これは IPv4 と IPv6 ソケットのみをサポートする。
.TP
.B \-s, \-\-summary
.\"O Print summary statistics. This option does not parse socket lists obtaining
.\"O summary from various sources. It is useful when amount of sockets is so huge
.\"O that parsing /proc/net/tcp is painful.
統計のサマリーを表示する。
このオプションはさまざまな情報源からサマリーを得るために、
ソケットのリストを解析しない。
これはソケットの量が膨大で、/proc/net/tcp を解析するのが苦痛な場合に、役に立つ。
.TP
.B \-E, \-\-events
.\"O Continually display sockets as they are destroyed
ソケットが破棄 (desctory) されたときに、連続して表示する。
.TP
.B \-Z, \-\-context
.\"O As the
.\"O .B \-p
.\"O option but also shows process security context.
.B \-p
と同様であるが、プロセスのセキュリティコンテキストを表示する。
.sp
.\"O For
.\"O .BR netlink (7)
.\"O sockets the initiating process context is displayed as follows:
.BR netlink (7)
ソケットについて、プロセスコンテキストの初期化は、
以下のように表示される。
.RS
.RS
.IP "1." 4
.\"O If valid pid show the process context.
有効な PID がある場合、プロセスコンテキストを表示する。
.IP "2." 4
.\"O If destination is kernel (pid = 0) show kernel initial context.
送信先がカーネル (pid = 0) の場合、
カーネルの初期コンテキストを表示する。
.IP "3." 4
.\"O If a unique identifier has been allocated by the kernel or netlink user,
.\"O show context as "unavailable". This will generally indicate that a
.\"O process has more than one netlink socket active.
カーネルまたは netlink ユーザによって一意な識別子が確保された場合、
コンテキスト "unavailable" を表示する。
これは一般的にプロセスが 1 つ以上のアクティブな
netlink ソケットを持っていることを意味する。
.RE
.RE
.TP
.B \-z, \-\-contexts
.\"O As the
.\"O .B \-Z
.\"O option but also shows the socket context. The socket context is
.\"O taken from the associated inode and is not the actual socket
.\"O context held by the kernel. Sockets are typically labeled with the
.\"O context of the creating process, however the context shown will reflect
.\"O any policy role, type and/or range transition rules applied,
.\"O and is therefore a useful reference.
.\"O:
.\"O: ここの翻訳は自信なし。
.\"O:
.B \-Z
と同様であるが、ソケットコンテキストも表示する。
ソケットコンテキストは、関連する inode から取得され、
カーネルが保持する実際のソケットコンテキストではない。
ソケットは生成されたプロセスのコンテキストでラベル付けされる。
しかし、表示されるコンテキストはポリシールール、
適用されるトランジションルールのタイプと範囲を反映しており、
有用な参考情報となる。
.TP
.B \-N NSNAME, \-\-net=NSNAME
.\"O Switch to the specified network namespace name.
指定したネットワークネームスペースの名前に切り替える。
.TP
.B \-b, \-\-bpf
.\"O Show socket BPF filters (only administrators are allowed to get these
.\"O information).
ソケット BPF フィルターを表示する
(管理者だけがこれらの情報を取得できる)。
.TP
.B \-4, \-\-ipv4
.\"O Display only IP version 4 sockets (alias for -f inet).
IP version 4 ソケットのみを表示する (-f inet のエイリアス)。
.TP
.B \-6, \-\-ipv6
.\"O Display only IP version 6 sockets (alias for -f inet6).
IP version 6 ソケットのみを表示する (-f inet6 のエイリアス)。
.TP
.B \-0, \-\-packet
.\"O Display PACKET sockets (alias for -f link).
PACKET ソケットを表示する (-f link のエイリアス)。
.TP
.B \-t, \-\-tcp
.\"O Display TCP sockets.
TCP ソケットを表示する。
.TP
.B \-u, \-\-udp
.\"O Display UDP sockets.
UDP ソケットを表示する。
.TP
.B \-d, \-\-dccp
.\"O Display DCCP sockets.
DCCP ソケットを表示する。
.TP
.B \-w, \-\-raw
.\"O Display RAW sockets.
RAW ソケットを表示する。
.TP
.B \-x, \-\-unix
.\"O Display Unix domain sockets (alias for -f unix).
Unix ドメインソケットを表示する (-f unix のエイリアス)。
.TP
.B \-S, \-\-sctp
.\"O Display SCTP sockets.
SCTP ソケットを表示する。
.TP
.B \-\-vsock
.\"O Display vsock sockets (alias for -f vsock).
vsock ソケットを表示する (-f vsock のエイリアス)。
.TP
.B \-\-xdp
.\"O Display XDP sockets (alias for -f xdp).
XDP ソケットを表示する (-f xdp のエイリアス)。
.TP
.B \-f FAMILY, \-\-family=FAMILY
.\"O Display sockets of type FAMILY.  Currently the following families are
.\"O supported: unix, inet, inet6, link, netlink, vsock, xdp.
タイプ FAMILY のソケットを表示する。
現在のところ以下のファミリーがサポートされている。
unix, inet, inet6, link, netlink, vsock, xdp。
.TP
.B \-A QUERY, \-\-query=QUERY, \-\-socket=QUERY
.\"O List of socket tables to dump, separated by commas. The following identifiers
.\"O are understood: all, inet, tcp, udp, raw, unix, packet, netlink, unix_dgram,
.\"O unix_stream, unix_seqpacket, packet_raw, packet_dgram, dccp, sctp,
.\"O vsock_stream, vsock_dgram, xdp Any item in the list may optionally be
.\"O prefixed by an exclamation mark
.\"O .RB ( ! )
.\"O to exclude that socket table from being dumped.
ダンプするソケットテーブルのカンマ区切りのリスト。
以下の識別子が利用できる。
all, inet, tcp, udp, raw, unix, packet, netlink, unix_dgram,
unix_stream, unix_seqpacket, packet_raw, packet_dgram, dccp, sctp,
vsock_stream, vsock_dgram, xdp。
リスト中のどのアイテムもオプションとしてエクスクラメーションマーク
.RB ( ! )
を前に付けて、ダンプするソケットテーブルから除外できる。
.TP
.B \-D FILE, \-\-diag=FILE
.\"O Do not display anything, just dump raw information about TCP sockets
.\"O to FILE after applying filters. If FILE is - stdout is used.
何も表示せず、フィルタを適用した後の TCP ソケットについての生情報を
FILE にダンプする。
FILE が - の場合、標準出力が使われる。
.TP
.B \-F FILE, \-\-filter=FILE
.\"O Read filter information from FILE.  Each line of FILE is interpreted
.\"O like single command line option. If FILE is - stdin is used.
フィルタ情報を FILE から読み込む。
FILE の各行は 1 つのコマンドラインオプションとして解釈される。
FILE が - の場合、標準入力が使われる。
.TP
.B FILTER := [ state STATE-FILTER ] [ EXPRESSION ]
.\"O Please take a look at the official documentation for details regarding filters.
フィルターについての詳細は、正式なドキュメントを参照してほしい。

.SH STATE-FILTER

.\"O .B STATE-FILTER
.\"O allows to construct arbitrary set of states to match. Its syntax is
.\"O sequence of keywords state and exclude followed by identifier of
.\"O state.
.B STATE-FILTER
を使うと、マッチングさせる任意の状態のセットを構築できる。
書式は、キーワード状態と除外の後に、状態の識別子が続く。
.TP
.\"O Available identifiers are:
指定可能な識別子は以下のとおり。

.\"O All standard TCP states:
すべての標準的な TCP 状態:
.BR established ", " syn-sent ", " syn-recv ", " fin-wait-1 ", " fin-wait-2 ", " time-wait ", " closed ", " close-wait ", " last-ack ", "
.\"O .BR  listening " and " closing.
.BR  listening ", " closing.

.B all
.\"O - for all the states
- すべての状態。

.B connected
.\"O - all the states except for
.\"O .BR listening " and " closed
.RB "- " listening " と " closed
を除く、すべての状態。

.B synchronized
.\"O - all the
.\"O .B connected
.\"O states except for
.\"O .B syn-sent
.RB "- " connected
から
.B syn-sent
を除いたすべての状態。

.B bucket
.\"O - states, which are maintained as minisockets, i.e.
.\"O .BR time-wait " and " syn-recv
- minisockets として管理されている状態。
つまり、
.BR time-wait " と " syn-recv

.B big
.\"O - opposite to
.\"O .B bucket
.RB "- " bucket
の反対。

.\"O .SH USAGE EXAMPLES
.SH 使用例
.TP
.B ss -t -a
.\"O Display all TCP sockets.
すべての TCP ソケットを表示する。
.TP
.B ss -t -a -Z
.\"O Display all TCP sockets with process SELinux security contexts.
SELinux セキュリティコンテキストのすべての TCP ソケットを表示する。
.TP
.B ss -u -a
.\"O Display all UDP sockets.
すべての UDP ソケットを表示する。
.TP
.B ss -o state established '( dport = :ssh or sport = :ssh )'
.\"O Display all established ssh connections.
確立されたすべての ssh 接続を表示する。
.TP
.B ss -x src /tmp/.X11-unix/*
.\"O Find all local processes connected to X server.
X サーバーに接続されたすべてのローカルプロセスを見つける。
.TP
.B ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24
.\"O List all the tcp sockets in state FIN-WAIT-1 for our apache to network
.\"O 193.233.7/24 and look at their timers.
apache からネットワーク 193.233.7/24 への
状態 FIN-WAIT-1 の TCP ソケットをすべてリスト表示し、タイマーも表示する。
.TP
.B ss -a -A 'all,!tcp'
.\"O List sockets in all states from all socket tables but TCP.
TCP 以外のすべてのソケットテーブルから、すべての状態の
ソケットをリスト表示する。
.\"O .SH SEE ALSO
.SH 関連項目
.BR ip (8),
.br
.BR RFC " 793 "
.\"O - https://tools.ietf.org/rfc/rfc793.txt (TCP states)
- https://tools.ietf.org/rfc/rfc793.txt (TCP 状態)

.\"O .SH AUTHOR
.SH 著者
.\"O .I ss
.\"O was written by Alexey Kuznetsov, <kuzne****@ms2*****>.
.I ss
は Alexey Kuznetsov, <kuzne****@ms2*****> によって書かれた。
.PP
.\"O This manual page was written by Michael Prokop <mika****@grml*****>
.\"O for the Debian project (but may be used by others).
このマニュアルは Michael Prokop <mika****@grml*****> によって、
Debian プロジェクトのために書かれた
(しかし、他のディストリビューションでも使えるだろう)。



linuxjm-discuss メーリングリストの案内
Back to archive index