From patchwork Wed Aug 1 06:16:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10551765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B63D41708 for ; Wed, 1 Aug 2018 06:16:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A171B2A5FC for ; Wed, 1 Aug 2018 06:16:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95B152A64D; Wed, 1 Aug 2018 06:16:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F36322A5FC for ; Wed, 1 Aug 2018 06:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733087AbeHAIAX (ORCPT ); Wed, 1 Aug 2018 04:00:23 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45744 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731897AbeHAIAX (ORCPT ); Wed, 1 Aug 2018 04:00:23 -0400 Received: by mail-pg1-f195.google.com with SMTP id f1-v6so10272965pgq.12 for ; Tue, 31 Jul 2018 23:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3vvRyuiUdb7ewbvfEHybAHyerAqLW1K2QPy+UQs9TlI=; b=AgrwCci92s5u+rEIndNgKqVHWUltAEHtTBovhSqQ47c65n0zvvQz4dwgiAeyNEG4qH y2ASfyVRYsAqEnchDG4yKB2ziH1U7m8ngs9ksB1rOyRkjnwk+md22pWcU3CsZr85RdXq eruayfo8+jMThEBufB/iXINudbiKLNndnSxHTGSIBxWLoD4/Q0OLB+79v/zqLmgI6lOy SPRreTb0WEDKmW5ZuYp7WJNXiYtFaMDpiZUBfTVNcYyKFgx1L29UIFSsdx7O2gpUt3po PpBE/J/5EWa87mb+RJCGqR1BW2/KLb55m6PeYvF/JFO5S5wPyLZGXgI4f4iaWJ85N1X2 4ddg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3vvRyuiUdb7ewbvfEHybAHyerAqLW1K2QPy+UQs9TlI=; b=FsXSoW30rL4x4Qh1iEpKYKcZN5S78guJVAsECBV/8I1AP3FII5p3HzfXgfBSyOY9ld N6uIWcvMP/5eOC5nXqYL9QI0RL55RRuf2bVzUvSghvKiyXzN0PzsYK8br0e16Q3oyLX/ UOnyYfC/79MBuZ+H0OqKUOeG+nXS1dU5sO50B+F1h6J3y5m4sYWGqo1UUdOs3k8OaRTV ImpDtipEkqsLpVhzZqcZuA+aSmegHLF/1JeAs5FvyAjfSv+ACSDXPrJLQNwgxc9EUdy0 HcH+CiDQ6kIHqHEVtS+Di+rx63e2WJ5OzW7pvNrPYioyYDx9tidjTLf0hFPWWVZsedSX kWMw== X-Gm-Message-State: AOUpUlGV8L29fcVEYJtzlUcPdwE56WLJHOOqi+iWh5GD7AJcXO3jWlrq ONAQLKkXjZPGcws1oTvGr5bb8KFbuJJzxsgymxsNoHB9 X-Google-Smtp-Source: AAOMgpeOPnvkhZS/jC1Qs1JOHaNfVnazhzk08EPoDH2SyAhueFllOiH4LEMeueLl0ou+V7rNS/Lnct0IigJN1z55a/g= X-Received: by 2002:a62:700a:: with SMTP id l10-v6mr25063927pfc.71.1533104183868; Tue, 31 Jul 2018 23:16:23 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Wed, 1 Aug 2018 01:16:12 -0500 Message-ID: Subject: [PATCH][SMB3] update readme to correct information about /proc/fs/cifs/Stats To: CIFS , samba-technical Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP [PATCH] smb3: update readme to correct information about /proc/fs/cifs/Stats Signed-off-by: Steve French Reviewed-by: Aurelien Aptel --- Documentation/filesystems/cifs/README | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) SecurityFlags Flags which control security negotiation and @@ -687,23 +686,22 @@ cifsFYI functions as a bit mask. Setting it to 1 enables additional kernel logging of various informational messages. 2 enables logging of non-zero SMB return codes while 4 enables logging of requests that take longer than one second to complete (except for byte range lock requests). -Setting it to 4 requires defining CONFIG_CIFS_STATS2 manually in the -source code (typically by setting it in the beginning of cifsglob.h), -and setting it to seven enables all three. Finally, tracing +Setting it to 4 requires CONFIG_CIFS_STATS2 to be set in kernel configuration +(.config). Setting it to seven enables all three. Finally, tracing the start of smb requests and responses can be enabled via: echo 1 > /proc/fs/cifs/traceSMB -Per share (per client mount) statistics are available in /proc/fs/cifs/Stats -if the kernel was configured with cifs statistics enabled. The statistics -represent the number of successful (ie non-zero return code from the server) -SMB responses to some of the more common commands (open, delete, mkdir etc.). +Per share (per client mount) statistics are available in /proc/fs/cifs/Stats. +Additional information is available if CONFIG_CIFS_STATS2 is enabled in the +kernel configuration (.config). The statistics returned include counters which +represent the number of attempted and failed (ie non-zero return code from the +server) SMB3 (or cifs) requests grouped by request type (read, write, close etc.). Also recorded is the total bytes read and bytes written to the server for that share. Note that due to client caching effects this can be less than the number of bytes read and written by the application running on the client. -The statistics for the number of total SMBs and oplock breaks are different in -that they represent all for that share, not just those for which the server -returned success. +Statistics can be reset to zero by "echo 0 > /proc/fs/cifs/Stats" which may be +useful if comparing performance of two different scenarios. Also note that "cat /proc/fs/cifs/DebugData" will display information about the active sessions and the shares that are mounted. From d627368a09c313eea5fede4dfd8a5e65fd4c0615 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 1 Aug 2018 01:13:55 -0500 Subject: [PATCH] smb3: update readme to correct information about /proc/fs/cifs/Stats Signed-off-by: Steve French --- Documentation/filesystems/cifs/README | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Documentation/filesystems/cifs/README b/Documentation/filesystems/cifs/README index 99ce3d25003d..4a804619cff2 100644 --- a/Documentation/filesystems/cifs/README +++ b/Documentation/filesystems/cifs/README @@ -603,8 +603,7 @@ DebugData Displays information about active CIFS sessions and shares, features enabled as well as the cifs.ko version. Stats Lists summary resource usage information as well as per - share statistics, if CONFIG_CIFS_STATS in enabled - in the kernel configuration. + share statistics. Configuration pseudo-files: SecurityFlags Flags which control security negotiation and @@ -687,23 +686,22 @@ cifsFYI functions as a bit mask. Setting it to 1 enables additional kernel logging of various informational messages. 2 enables logging of non-zero SMB return codes while 4 enables logging of requests that take longer than one second to complete (except for byte range lock requests). -Setting it to 4 requires defining CONFIG_CIFS_STATS2 manually in the -source code (typically by setting it in the beginning of cifsglob.h), -and setting it to seven enables all three. Finally, tracing +Setting it to 4 requires CONFIG_CIFS_STATS2 to be set in kernel configuration +(.config). Setting it to seven enables all three. Finally, tracing the start of smb requests and responses can be enabled via: echo 1 > /proc/fs/cifs/traceSMB -Per share (per client mount) statistics are available in /proc/fs/cifs/Stats -if the kernel was configured with cifs statistics enabled. The statistics -represent the number of successful (ie non-zero return code from the server) -SMB responses to some of the more common commands (open, delete, mkdir etc.). +Per share (per client mount) statistics are available in /proc/fs/cifs/Stats. +Additional information is available if CONFIG_CIFS_STATS2 is enabled in the +kernel configuration (.config). The statistics returned include counters which +represent the number of attempted and failed (ie non-zero return code from the +server) SMB3 (or cifs) requests grouped by request type (read, write, close etc.). Also recorded is the total bytes read and bytes written to the server for that share. Note that due to client caching effects this can be less than the number of bytes read and written by the application running on the client. -The statistics for the number of total SMBs and oplock breaks are different in -that they represent all for that share, not just those for which the server -returned success. +Statistics can be reset to zero by "echo 0 > /proc/fs/cifs/Stats" which may be +useful if comparing performance of two different scenarios. Also note that "cat /proc/fs/cifs/DebugData" will display information about the active sessions and the shares that are mounted. -- 2.17.1