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