summaryrefslogtreecommitdiffstats
path: root/cmd/arcstat
diff options
context:
space:
mode:
authorFabian-Gruenbichler <[email protected]>2017-10-26 21:18:49 +0200
committerTony Hutter <[email protected]>2017-11-20 16:19:23 -0600
commitd834d6811bbb74c9c58e8b0c36a466a71e13389b (patch)
treefb73b7d1d466e4d2cd3d1d773dbb60165821ff25 /cmd/arcstat
parent029a1b0c207f204b1b78086b009c6de8fc383cb3 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Fabian Grünbichler <[email protected]> Closes #6775
Diffstat (limited to 'cmd/arcstat')
-rwxr-xr-xcmd/arcstat/arcstat.py1
1 files changed, 1 insertions, 0 deletions
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():