From: Fabian-Gruenbichler Date: Thu, 26 Oct 2017 19:18:49 +0000 (+0200) Subject: arcstat: flush stdout / outfile after each line X-Git-Tag: zfs-0.7.4~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d834d6811bbb74c9c58e8b0c36a466a71e13389b;p=zfs arcstat: flush stdout / outfile after each line 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 --- 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():