From patchwork Thu Oct 26 07:15:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yupeng X-Patchwork-Id: 830468 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Elq4R+X0"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yMyw63dT5z9t3Z for ; Thu, 26 Oct 2017 18:15:50 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751705AbdJZHPr (ORCPT ); Thu, 26 Oct 2017 03:15:47 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:45450 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbdJZHPq (ORCPT ); Thu, 26 Oct 2017 03:15:46 -0400 Received: by mail-pg0-f65.google.com with SMTP id b192so2007151pga.2 for ; Thu, 26 Oct 2017 00:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zFBXKRW0U3SlP3Uay/OhRJT2sZ8Z3Cj/VDzHQiQnlek=; b=Elq4R+X0XM5V8c5hxpEiQNkwyWJjQxk5HfFTreBlA+FxaHdUTK21ifUrT87FVw9XKW Uuv+w1NqeIAZLV4WyIKJKVSSfJ4zTx53fLD4IioFIawDSGTc7u16KlqP12r5Ajipmd0v zAVm2BKOEGBWwYwQ0pPXGNEn0PzZC4VqHACXD63eHw4eIJtZlUEwpmSW5FqZ5ZU9WFom r/Ow4fpEqSyv9b9aKEnAP8Q0rogyeP5aMkS4aYqNEYHNNvO6PYXQxIL6UN5s+9H3Ug/W JUg3PYti9lZzO6MO0HqLB2rvCG9CHsZ3HMBYMHbThx2PnseCab4/rNsJU++xHMQXgg8M r+ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zFBXKRW0U3SlP3Uay/OhRJT2sZ8Z3Cj/VDzHQiQnlek=; b=qC3W0la05tca3PU+0KNyu0VfT/0u1yIP5Sj00Ez3wiMhRyQpss8fLTjNDwLv7Hm9XO KOzmtJKMly4UOdFfhMbJJksTJnZyE7mnsBKovmUkNKG66Bgns0NGIWd0+uE+DZzvP2ZE 2sf6XCh0XSUxEhRf7Hs+u7lmkb89c05uIXSyMS7wPIgtt2muknZoIfJlN9mv/DfBF56+ FkqYKfcsJi5BVUMpkr3XwTFLExB/0gs3KCVKBQivEIHGg6UrcnhdNd3C0y3dBJXa31M0 UiKH3BsNcnww6aXihuT8Z1hwFacW0Omhmbyg2qJpS3lwcjCR7VDWxkzS3D1X5IGKeV0O HDAQ== X-Gm-Message-State: AMCzsaX9/ynlPcAHIqLymQfgzrMBY6ghQYSQX2YSTjVK3vMeeqQitUTN r4H0DdxhUnI4GpwN/b6Jy+upUqfovLEt2IGa X-Google-Smtp-Source: ABhQp+R4zb1OjnW0GLDqqWxeUCycbc3Whs9OdttiPEiiOU9RBvZmCpEtslDEkBvcg8ha8uZpoFv+qg== X-Received: by 10.159.234.12 with SMTP id be12mr3753610plb.350.1509002145936; Thu, 26 Oct 2017 00:15:45 -0700 (PDT) Received: from ip-172-31-39-117.us-west-2.compute.internal (ec2-52-35-119-175.us-west-2.compute.amazonaws.com. [52.35.119.175]) by smtp.gmail.com with ESMTPSA id s88sm9640802pfe.36.2017.10.26.00.15.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Oct 2017 00:15:45 -0700 (PDT) From: yupeng To: netdev@vger.kernel.org Cc: phil@nwl.cc, mrv@mojatatu.com, stephen@networkplumber.org, yupeng Subject: [PATCH] add additional explain in ss man page Date: Thu, 26 Oct 2017 07:15:31 +0000 Message-Id: <1509002131-22251-1-git-send-email-yupeng0921@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20171025215221.GT32305@orbyte.nwl.cc> References: <20171025215221.GT32305@orbyte.nwl.cc> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add detail explains of -m, -o, -e and -i options, which are not documented anywhere Signed-off-by: yupeng Acked-by: Phil Sutter --- man/man8/ss.8 | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 181 insertions(+), 4 deletions(-) diff --git a/man/man8/ss.8 b/man/man8/ss.8 index 3bec97f..8565ccb 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 @@ -37,19 +37,196 @@ Display both listening and non-listening (for TCP this means established connect Display only listening sockets (these are omitted by default). .TP .B \-o, \-\-options -Show timer information. +Show timer information. For tcp protocol, the output format is: +.RS +.P +timer:(,,) +.P +.TP +.B +the name of the timer, there are five kind of timer names: +.RS +.P +.BR on ": means one of these timers: tcp retrans timer, tcp early retrans timer and tail loss probe timer" +.P +.BR keepalive ": tcp keep alive timer" +.P +.BR timewait ": timewait stage timer" +.P +.BR persist ": zero window probe timer" +.P +.BR unknown ": none of the above timers" +.RE +.TP +.B +how long time the timer will expire +.P +.TP +.B +how many times the retran occurs +.RE .TP .B \-e, \-\-extended -Show detailed socket information +Show detailed socket information. The output format is: +.RS +.P +uid: ino: sk: +.P +.TP +.B +the user id the socket belongs to +.P +.TP +.B +the socket's inode number in VFS +.P +.TP +.B +an uuid of the socket +.RE .TP .B \-m, \-\-memory -Show socket memory usage. +Show socket memory usage. The output format is: +.RS +.P +skmem:(r,rb,t,tb,f,w,o,bl) +.P +.TP +.B +the memory allocated for receiving packet +.P +.TP +.B +the total memory can be allocated for receiving packet +.P +.TP +.B +the memory used for sending packet (which has been sent to layer 3) +.P +.TP +.B +the total memory can be allocated for sending packet +.P +.TP +.B +the memory allocated by the socket as cache, but not used for receiving/sending packet yet. If need memory to send/receive packet, the memory in this cache will be used before allocate additional memory. +.P +.TP +.B +The memory allocated for sending packet (which has not been sent to layer 3) +.P +.TP +.B +The memory used for storing socket option, e.g., the key for TCP MD5 signature +.P +.TP +.B +The memory used for the sk backlog queue. On a process context, if the process is receiving packet, and a new packet is received, it will be put into the sk backlog queue, so it can be received by the process immediately +.RE .TP .B \-p, \-\-processes Show process using socket. .TP .B \-i, \-\-info -Show internal TCP information. +Show internal TCP information. Below fields may appear: +.RS +.P +.TP +.B ts +show string "ts" if the timestamp option is set +.P +.TP +.B sack +show string "sack" if the sack option is set +.P +.TP +.B ecn +show string "ecn" if the explicit congestion notification option is set +.P +.TP +.B ecnseen +show string "ecnseen" if the saw ecn flag is found in received packets +.P +.TP +.B fastopen +show string "fastopen" if the fastopen option is set +.P +.TP +.B cong_alg +the congestion algorithm name, the default congestion algorithm is "cubic" +.P +.TP +.B wscale:: +if window scale option is used, this field shows the send scale factory and receive scale factory +.P +.TP +.B rto: +tcp re-transmission timeout value, the unit is millisecond +.P +.TP +.B backoff: +used for exponential backoff re-transmission, the actual re-transmission timeout value is icsk_rto << icsk_backoff +.P +.TP +.B rtt:/ +rtt is the average round trip time, rttvar is the mean deviation of rtt, their units are millisecond +.P +.TP +.B ato: +ack timeout, unit is millisecond, used for delay ack mode +.P +.TP +.B mss: +max segment size +.P +.TP +.B cwnd: +congestion window size +.P +.TP +.B ssthresh: +tcp congestion window slow start threshold +.P +.TP +.B bytes_acked: +bytes acked +.P +.TP +.B bytes_received: +bytes received +.P +.TP +.B segs_out: +segments sent out +.P +.TP +.B segs_in: +segments received +.P +.TP +.B send bps +egress bps +.P +.TP +.B lastsnd: +how long time since the last packet sent, the unit is millisecond +.P +.TP +.B lastrcv: +how long time since the last packet received, the unit is millisecond +.P +.TP +.B lastack: +how long time since the last ack received, the unit is millisecond +.P +.TP +.B pacing_rate bps/bps +the pacing rate and max pacing rate +.P +.TP +.B rcv_space: +a helper variable for TCP internal auto tuning socket receive buffer +.RE .TP .B \-K, \-\-kill Attempts to forcibly close sockets. This option displays sockets that are