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 <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Closes #6775
This commit is contained in:
Fabian-Gruenbichler 2017-10-26 21:18:49 +02:00 committed by Brian Behlendorf
parent 69b229bd60
commit 3ad59c015d

View File

@ -219,6 +219,7 @@ def print_values():
sep
))
sys.stdout.write("\n")
sys.stdout.flush()
def print_header():