commit | 7b2c114a8049196aa52281f55929cf51c363cc77 | [log] [tgz] |
---|---|---|
author | xingfeng2510 <xingfeng25100@163.com> | Thu Mar 24 10:51:26 2022 +0800 |
committer | yonghong-song <ys114321@gmail.com> | Wed Mar 23 23:19:06 2022 -0700 |
tree | 57e4de56bf9f2036b30240e9ee7700fba263744d | |
parent | 43fec8b8eddaf3dd8805ff0cfcf4bd031db60f38 [diff] [blame] |
tools: Flush stdout explicitly in event loop
diff --git a/tools/softirqs.py b/tools/softirqs.py index d98b938..2186277 100755 --- a/tools/softirqs.py +++ b/tools/softirqs.py
@@ -17,6 +17,7 @@ from bcc import BPF from time import sleep, strftime import argparse +import sys # arguments examples = """examples: @@ -175,6 +176,8 @@ print("%-16s %11d" % (vec_to_name(k.vec), v.value / factor)) dist.clear() + sys.stdout.flush() + countdown -= 1 if exiting or countdown == 0: exit()