From 3ad59c015dce45965fa309a0364a46c6f8bdda9f Mon Sep 17 00:00:00 2001 From: Fabian-Gruenbichler Date: Thu, 26 Oct 2017 21:18:49 +0200 Subject: 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(+) (limited to 'cmd') diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py index d969da8d4..aa54ee87a 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(): -- cgit v1.2.3