I developed a process named X0 that continually appends some lines to a CSV file to register some electrical data as voltage or power.
This process run a python program and is started using following command:
sudo systemctl start getdata.Hypontech.system
The python code used to open CSV file in appending mode is following
def OpenDataFile():
global f
dt = datetime.now()
global iFileDay
iFileDay = dt.day
sFileDate = dt.strftime("%Y-%m-%d")
sFile = "./data.H1/Measures." + sFileDate + ".csv"
print("FILE: " + sFile)
f = open(sFile, "a")
f.write(sFileDate + ";" + sHeader)
f.write("\r\n")
When I use cat or tail Linux command, I see only lines written before X0 process is started.
How can I display last CSV lines (or content) without stopping X0 process?
If it is impossible using Linux standard command, is there a tool that allows that?