finished already?
This commit is contained in:
11
ifstat.py
11
ifstat.py
@@ -43,12 +43,13 @@ def runifstat():
|
||||
interfaces = bylines[0].split()
|
||||
stats = bylines[2].split()
|
||||
|
||||
breakpoint()
|
||||
for nic in interfaces:
|
||||
lineData = [timestamp, nic, stats.pop(0), stats.pop(0)]
|
||||
|
||||
if lineData:
|
||||
with open(filename, "a", newline="") as csvfile:
|
||||
csv_writer = csv.writer(csvfile)
|
||||
csv_writer.writerow(lineData)
|
||||
if lineData:
|
||||
with open(filename, "a", newline="") as csvfile:
|
||||
csv_writer = csv.writer(csvfile)
|
||||
csv_writer.writerow(lineData)
|
||||
|
||||
else:
|
||||
print(f"Error running command: {result.stderr}")
|
||||
|
||||
Reference in New Issue
Block a user