Page 1 of 1

Raspberry Pi disk usage fix

Posted: Mon Aug 31, 2015 10:41 am
by cyberdiamond

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.