I popped into the WMT earlier this afternoon and took a copy of all the files written since we deployed, see attached.
The first thing that hits you is that the log files are enormous! (They are far bigger than the log files on any of my Linux boxes ) I think that we ought to consider only writing to the log when something changes (that would mean only a few lines in the Float_Readings.txt file instead of over 4000 ) Secondly, there is a lot of repetition within the log files. For example:
Code: Select all
04/10/2017 11:41:46 AM - River System Control Software 0.9.1 - DEBUG: Sockets.read_pending_messages(): Waiting for data...
04/10/2017 11:41:47 AM - River System Control Software 0.9.1 - DEBUG: Sockets.send_pending_messages(): Sending any pending messages...
04/10/2017 11:41:47 AM - River System Control Software 0.9.1 - DEBUG: Sockets.send_pending_messages(): Done.
04/10/2017 11:41:47 AM - River System Control Software 0.9.1 - DEBUG: Sockets.read_pending_messages():
Code: Select all
Attempting to read from socket...
04/10/2017 11:43:31 AM - River System Control Software 0.9.1 - DEBUG: Sockets.read_pending_messages(): Waiting for data...
04/10/2017 11:43:32 AM - River System Control Software 0.9.1 - DEBUG: Sockets.send_pending_messages(): Sending any pending messages...
04/10/2017 11:43:32 AM - River System Control Software 0.9.1 - DEBUG: Sockets.send_pending_messages(): Done.
04/10/2017 11:43:32 AM - River System Control Software 0.9.1 - DEBUG: Sockets.read_pending_messages():
Finally, the total size on disc of all the files is around half a gig, but compressed they come down to 10.8 MB. We probably need to think about compressing each file every week or so and starting a new one (as is done in /var/log).
Other than that the system does seem to be working; there are readings between 400 and 800 mm in the Levels file, so that's good.
One other thing. Hamish, I think that when you set up the software in .bashrc to autostart, you forgot this:
Code: Select all
if [ $(tty) == /dev/tty1 ]; then
cd rivercontrolsystem-master
./master.py -f <filename>
fi
Code: Select all
if [ $(tty) == /dev/tty1 ]; then
rdate -v 192.168.0.2
cd rivercontrolsystem-master
./universal_standalone_monitor.py -f <filename>
fi