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