Raspberry Pi disk usage fix

Talks about solar stuff
Posts: 2
Joined: Thu Sep 12, 2013 7:55 am

Raspberry Pi disk usage fix

Post by cyberdiamond » Mon Aug 31, 2015 10:41 am


I saw a problem in the info page with disk usage wrong on a Raspberry Pi running raspbian.
Here is a simple way to fix it.

Code: Select all

cp -a /path/to/123solar/scripts/distros/debian_ARM.php /path/to/123solar/scripts/distros/raspbian_ARM.php
vi /path/to/123solar/scripts/distros/raspbian_ARM.php
/path/to is where ever YOUR 123solar path is installed.

Replace rootfs with /dev/root in the last two DISK lines

Code: Select all

OR just copy the below:

Code: Select all

# Commands
$CPUUSE="ps aux|awk 'NR > 0 { s +=$3 }; END {print \"cpu %\",s}' | awk '{ print $3 }'";
$MEMTOT="free -m | grep 'Mem' | awk '{print $2}'";
$MEMUSE="free -m| grep 'buffers/cache' | awk '{print $3}'";
$MEMFREE="free -m| grep 'buffers/cache' | awk '{print $4}'";
$DISKUSE="df -h | grep /dev/root | awk '{print $3}'";
$DISKFREE="df -h | grep /dev/root | awk '{print $4}'";
To a new file save it as raspbian_ARM.php to the directory /path/to/123solar/scripts/distros/

Change permissions of the file as required then go to admin page.
Select the raspbian_ARM distro on admin page, restart 123solar if needed.



Who is online

Users browsing this forum: No registered users and 1 guest