testing
This commit is contained in:
@@ -2,6 +2,7 @@ import subprocess
|
|||||||
import re
|
import re
|
||||||
import csv
|
import csv
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
# Define your shell command
|
# Define your shell command
|
||||||
command = ["zpool", "iostat", "-Tu", "-l", "-p", "-v", "-y", "1", "1"]
|
command = ["zpool", "iostat", "-Tu", "-l", "-p", "-v", "-y", "1", "1"]
|
||||||
@@ -46,6 +47,11 @@ def runZpoolIostat():
|
|||||||
if i == 0:
|
if i == 0:
|
||||||
# get timestamp
|
# get timestamp
|
||||||
timestamp = pool.splitlines()[0].strip()
|
timestamp = pool.splitlines()[0].strip()
|
||||||
|
# Convert to human-readable time using time.localtime()
|
||||||
|
local_time = time.localtime(timestamp)
|
||||||
|
# Format the time components for a more readable output
|
||||||
|
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", local_time)
|
||||||
|
|
||||||
breakpoint()
|
breakpoint()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user