linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Harshula Jayasuriya <harshula@redhat.com>
Cc: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsiostat: periodically flush stdout
Date: Wed, 18 Sep 2013 15:15:47 -0400	[thread overview]
Message-ID: <5239FBE3.3020107@RedHat.com> (raw)
In-Reply-To: <1378747050.4117.122.camel@serendib>



On 09/09/13 13:17, Harshula Jayasuriya wrote:
> * In a shell script, when nfsiostat is run in the background with
>   stdout redirected to a file, flush stdout periodically to ensure
>   that we do not lose the buffered output if the nfsiostat process 
>   is killed.
> 
> Signed-off-by: Harshula Jayasuriya <harshula@redhat.com>
Committed!

steved.

> ---
>  tools/nfs-iostat/nfs-iostat.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
> index c035537..155581c 100644
> --- a/tools/nfs-iostat/nfs-iostat.py
> +++ b/tools/nfs-iostat/nfs-iostat.py
> @@ -413,6 +413,8 @@ class DeviceData:
>              self.__print_rpc_op_stats('WRITE', sample_time)
>              self.__print_page_stats(sample_time)
>  
> +        sys.stdout.flush()
> +
>  #
>  # Functions
>  #
> 

      reply	other threads:[~2013-09-18 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 17:17 [PATCH] nfsiostat: periodically flush stdout Harshula Jayasuriya
2013-09-18 19:15 ` 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=5239FBE3.3020107@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=harshula@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).