I need help with a critical issue:
Short story: On January 3, data collection at an Emonbase stopped. The pi is running since when without reboot, so I hope the data is still in the redis queue and I can save it to the disk.
What can I try to do without making it worse?
feedwriter, apache, redis, mosquitto and emonhub are all running. Nevertheless I restarted the feedwriter and the Mosquitto service, which didn’t help.
I’ve noticed two things: The last log entry in /var/log/emoncms.log is also from January 3, 2018 and the log partition seems to be full.
It’s critical to me since I am performing a measurement for a client with an Emontx that is directly connected to a Pi with an emonSD image. It’s being deployed remotely, but I have SSH access to it. The data is logged locally on the pi and also sent to a remote emoncms server. Due to some data gaps on the remote server I have to use the data stored on the pi.
This gives some more information where the problem might be:
[email protected](ro):~$ sudo systemctl status emonhub ● emonhub.service - LSB: Start/stop emonHub Loaded: loaded (/etc/init.d/emonhub) Active: active (running) since Do 2018-02-22 03:31:29 UTC; 1 months 21 days ago Process: 30918 ExecStop=/etc/init.d/emonhub stop (code=exited, status=0/SUCCESS) Process: 31188 ExecStart=/etc/init.d/emonhub start (code=exited, status=0/SUCCESS) CGroup: /system.slice/emonhub.service └─31235 python /usr/share/emonhub/emonhub.py --config-file /home/pi/data/emonhub.conf --logfile /var/... Apr 14 15:30:21 rexometer emonhub: self.stream.flush() Apr 14 15:30:21 rexometer emonhub: IOError: [Errno 28] No space left on device Apr 14 15:30:21 rexometer emonhub: Logged from file EmonHubMqttInterfacer.py, line 142 Apr 14 15:30:22 rexometer emonhub: Traceback (most recent call last): Apr 14 15:30:22 rexometer emonhub: File "/usr/lib/python2.7/logging/__init__.py", line 883, in emit Apr 14 15:30:22 rexometer emonhub: self.flush() Apr 14 15:30:22 rexometer emonhub: File "/usr/lib/python2.7/logging/__init__.py", line 843, in flush Apr 14 15:30:22 rexometer emonhub: self.stream.flush() Apr 14 15:30:22 rexometer emonhub: IOError: [Errno 28] No space left on device Apr 14 15:30:22 rexometer emonhub: Logged from file EmonHubJeeInterfacer.py, line 96
[email protected](ro):~$ df -h Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf /dev/root 3,4G 2,0G 1,3G 61% / devtmpfs 483M 0 483M 0% /dev tmpfs 487M 0 487M 0% /dev/shm tmpfs 487M 56M 432M 12% /run tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 487M 0 487M 0% /sys/fs/cgroup tmpfs 40M 6,1M 34M 16% /var/lib/openhab tmpfs 1,0M 8,0K 1016K 1% /var/lib/dhcpcd5 tmpfs 1,0M 4,0K 1020K 1% /var/lib/dhcp tmpfs 50M 50M 0 100% /var/log tmpfs 30M 36K 30M 1% /tmp /dev/mmcblk0p1 60M 21M 40M 35% /boot /dev/mmcblk0p3 3,5G 159M 3,2G 5% /home/pi/data
So it’s seems emonhub is not working because the log partition is full. Can I just delete the log files and restart emonhub?
I did delete some old rotated logs. Is it safe to restart emonhub now without losing data in the queue (if there are any)?
I restarted emonhub, mqtt_input and feedwriter and I thought it had worked because the file size of the phpfina file climbed up from 6 MB to 10 MB. But exporting the values to csv using this tool: Access data files & convert to csv - #2 by Jon showed no data between january 3 and now. That seems quite odd, doesn’t it?
The mentioned export tool showed with the 6 MB file:
filesize: 6747752 npoints: 1686938
and with the new one:
filesize: 10237724 npoints: 2559431
Difference: 872493 points. So there is actually more data than the tool is exporting. Any idea how to get to the data?