This commit is contained in:
Marc Mance
2024-07-30 18:16:53 -04:00
parent 949db6dadc
commit ceaf1119cf

View File

@@ -175,10 +175,8 @@ def zpoolIostat():
def collect_data(minutes):
start_time = datetime.now()
# Continuously collect data for the specified duration
if is_freebsd():
print("Starting gstat collection.")
gstat_command = ["gstat", "-C", "-s", "-d", "-o", "-p", "-I", "5s"]
with open("gstat.csv", "a") as output_file:
# Create a Popen object with stdout redirected to the file
@@ -209,6 +207,7 @@ def collect_data(minutes):
# kill gstat if freebsd
if is_freebsd():
print("Killing gstat process.")
process.kill()