All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Rohan Sable <rsable@redhat.com>, linux-nfs@vger.kernel.org
Cc: smayhew@redhat.com, chuck.lever@oracle.com
Subject: Re: [PATCH v3] mountstats: Adding 'Day, Hour:Min:Sec' to "mountstats --nfs" for ease of understanding.
Date: Thu, 18 Jun 2020 13:09:21 -0400	[thread overview]
Message-ID: <8daedaf7-e70c-c2dd-8dad-cc26898e6460@RedHat.com> (raw)
In-Reply-To: <20200605144835.GA98618@fedora.rsable.com>



On 6/5/20 10:48 AM, Rohan Sable wrote:
> This patch adds printing of 'Days, Hours:Mins:Sec' like below to --nfs in mountstats :
> NFS mount age : 12 days, 23:59:59
> 
> Signed-off-by: Rohan Sable <rsable@redhat.com>
Committed.... 

steved.
> ---
>  tools/mountstats/mountstats.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
> index d565385d..014f38a3 100755
> --- a/tools/mountstats/mountstats.py
> +++ b/tools/mountstats/mountstats.py
> @@ -4,6 +4,7 @@
>  """
>  
>  from __future__ import print_function
> +import datetime as datetime
>  
>  __copyright__ = """
>  Copyright (C) 2005, Chuck Lever <cel@netapp.com>
> @@ -391,6 +392,7 @@ class DeviceData:
>          """Pretty-print the NFS options
>          """
>          print('  NFS mount options: %s' % ','.join(self.__nfs_data['mountoptions']))
> +        print('  NFS mount age: %s' % datetime.timedelta(seconds = self.__nfs_data['age']))
>          print('  NFS server capabilities: %s' % ','.join(self.__nfs_data['servercapabilities']))
>          if 'nfsv4flags' in self.__nfs_data:
>              print('  NFSv4 capability flags: %s' % ','.join(self.__nfs_data['nfsv4flags']))
> 


      reply	other threads:[~2020-06-18 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 14:48 [PATCH v3] mountstats: Adding 'Day, Hour:Min:Sec' to "mountstats --nfs" for ease of understanding Rohan Sable
2020-06-18 17:09 ` Steve Dickson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8daedaf7-e70c-c2dd-8dad-cc26898e6460@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rsable@redhat.com \
    --cc=smayhew@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.