From 7bc07a2b41fe58a6876ceaa6bafc32c02c012d45 Mon Sep 17 00:00:00 2001 From: Marc Mance Date: Thu, 30 May 2024 12:23:51 -0400 Subject: [PATCH] testing --- ixiostat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ixiostat.py b/ixiostat.py index c941a7e..0e5cbfb 100644 --- a/ixiostat.py +++ b/ixiostat.py @@ -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: