This commit is contained in:
Marc Mance
2024-07-30 18:15:52 -04:00
parent 223c09d4be
commit 949db6dadc

View File

@@ -174,7 +174,7 @@ def zpoolIostat():
print(f"Error running command: {collect}")
def collect_data(minutes, interval):
def collect_data(minutes):
start_time = datetime.now()
# Continuously collect data for the specified duration
@@ -203,7 +203,7 @@ def collect_data(minutes, interval):
if i == minutes:
break
time.sleep(interval)
time.sleep(60)
print("")
@@ -291,12 +291,11 @@ def main():
welcome()
minutes = int(input("Enter the duration in minutes: "))
interval = 60 # Default interval between data collection cycles (seconds)
print("Starting Collection")
# Collect data
collect_data(minutes, interval)
collect_data(minutes)
# Copy data files to /var/log (replace with appropriate copying function)
collect_csv()