From 7a40093880a49bfab8a5b314645c401d612da435 Mon Sep 17 00:00:00 2001 From: Marc Mance Date: Tue, 30 Jul 2024 17:53:57 -0400 Subject: [PATCH] more update --- collect.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/collect.py b/collect.py index aac7cba..9f31ede 100644 --- a/collect.py +++ b/collect.py @@ -187,6 +187,9 @@ def collect_data(minutes, interval): for i in range(minutes): # Collect data using system commands + if i == 0: + print("Minute:", end="", flush=True) + print(f" {i}", end="", flush=True) zpoolIostat() coreifstat() @@ -198,10 +201,8 @@ def collect_data(minutes, interval): if is_freebsd(): coreIostat_cpu() - if i == 0: - print("Minute:", end="", flush=True) - - print(f" {i}", end="", flush=True) + if i == minutes: + break time.sleep(interval)