testing
This commit is contained in:
@@ -2,6 +2,7 @@ import subprocess
|
||||
import re
|
||||
import csv
|
||||
import os
|
||||
import time
|
||||
|
||||
# Define your shell command
|
||||
command = ["zpool", "iostat", "-Tu", "-l", "-p", "-v", "-y", "1", "1"]
|
||||
@@ -46,6 +47,11 @@ def runZpoolIostat():
|
||||
if i == 0:
|
||||
# get timestamp
|
||||
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()
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user