So the command line curl (on an SSH session) works fine
pi@emonpi:~ $ curl -s https://raw.githubusercontent.com/openenergymonitor/EmonScripts/master/safe-update
emonSD-02Oct19
emonSD-17Oct19
pi@emonpi:~
The first df -h
pi@emonpi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 4.0G 2.1G 1.7G 55% /
devtmpfs 484M 0 484M 0% /dev
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 488M 19M 470M 4% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 488M 0 488M 0% /sys/fs/cgroup
tmpfs 1.0M 0 1.0M 0% /var/lib/php/sessions
tmpfs 30M 30M 0 100% /tmp
tmpfs 1.0M 0 1.0M 0% /var/tmp
/dev/mmcblk0p3 10G 41M 9.5G 1% /var/opt/emoncms
/dev/mmcblk0p1 253M 52M 201M 21% /boot
log2ram 50M 37M 14M 74% /var/log
tmpfs 98M 0 98M 0% /run/user/1000
pi@emonpi:~ $
Reboot [see below], and second df -h
pi@emonpi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 4.0G 2.1G 1.7G 55% /
devtmpfs 484M 0 484M 0% /dev
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 488M 6.5M 482M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 488M 0 488M 0% /sys/fs/cgroup
tmpfs 1.0M 0 1.0M 0% /var/lib/php/sessions
tmpfs 30M 0 30M 0% /tmp
tmpfs 1.0M 0 1.0M 0% /var/tmp
/dev/mmcblk0p3 10G 41M 9.5G 1% /var/opt/emoncms
/dev/mmcblk0p1 253M 52M 201M 21% /boot
log2ram 50M 38M 13M 75% /var/log
tmpfs 98M 0 98M 0% /run/user/1000
pi@emonpi:~ $
Now about this rebooting thing.
Maybe related to my other issues, could be nothing but I am find rebooting troublesome. Today when trying the reboot sandwich in between a pair of df -h I struggled. I first asked the emonPi to reboot from the button at the bottom of Setup / Admin from a browser login to it’s IP address.
Certainly yes the separate PuTTY session in to port 22 died immediately, and after 3 minutes (measured by a timer on my phone) I tried PuTTY again - timed out. Went to the emonPi (inconveniently located but aren’t all utility meters), no LCD backlight and no response to the button.
Removed 5V power, waited around 2 minutes minutes, repowered. Went through splash screen, sensor detection, and gets to Raspberry Pi booting … message. After another 5 minutes no progress on LCD, backlight and booting message still there (that message needs to be animated so you can tell when it sticks). Removed 5V power and AC voltage sensor power, left for 15 minutes.
Reapplied AC voltage then 5V power. Went through normal boot sequence to WiFi Yes xx% & DHCP’d IP address. Happy, or so I think.
I extract the second df -h and write it here. Then try browsing to the usual web page at the Pi’s IP. Very strange result - rather than a login landing page I get
Fatal error : Uncaught Error: Call to a member function fetch_array() on bool in /var/www/emoncms/core.php:43 Stack trace: #0 /var/www/emoncms/index.php(82): db_check(Object(mysqli), ‘emoncms’) #1 {main} thrown in /var/www/emoncms/core.php on line 43
Tried on two different browsers (edge & chrome) and to the bare IP or at IP:80. All the same result.
So is my SDcard gradually disintegrating? Do I have a hardware issue? What is the issue with not powering down gracefully?
ConfusionLevel++