edit
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user