From d834d6811bbb74c9c58e8b0c36a466a71e13389b Mon Sep 17 00:00:00 2001 From: Fabian-Gruenbichler Date: Thu, 26 Oct 2017 21:18:49 +0200 Subject: [PATCH] arcstat: flush stdout / outfile after each line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise, if arcstat gets interrupted before the desired number of iterations is reached, the output file will be empty (both if set via '-o' or via shell redirection). Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: Fabian Grünbichler Closes #6775 --- cmd/arcstat/arcstat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py index d969da8d4e..aa54ee87a7 100755 --- a/cmd/arcstat/arcstat.py +++ b/cmd/arcstat/arcstat.py @@ -219,6 +219,7 @@ def print_values(): sep )) sys.stdout.write("\n") + sys.stdout.flush() def print_header():