#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin . /usr/lib/libmodcgi.sh get_env() { cat /proc/sys/urlader/environment | grep "^$1" | sed -e 's/'"$1"' //' } stat_bar() { percent=$1; let bar="percent*4"; let grey="(100-percent)*4" echo '
' } stat_button() { echo '' } cgi_begin 'Status' 'status' sec_begin 'Box' cat << EOFEOF sec_end sec_begin '$(lang de:"Hauptspeicher" en:"Memory")' total="$(cat /proc/meminfo | grep '^MemTotal:' | sed s/[^0-9]//g)" free="$(cat /proc/meminfo | grep '^MemFree:' | sed s/[^0-9]//g)" cached="$(cat /proc/meminfo | grep '^Cached:' | sed s/[^0-9]//g)" let usedwc="total-cached-free" let percent="100*usedwc/total" echo "
Gesamt: $total KB
"
echo "Belegt: $usedwc KB (ohne Cache)
$(lang de:"tffs ist zu ${percent}% belegt." en:"tffs fill: ${percent}%")
" stat_bar $percent sec_end stat_button 'reboot' 'Reboot' stat_button 'restart_dsld' 'Restart dsld' stat_button 'cleanup' 'Cleanup tffs' stat_button 'downgrade' 'Downgrade Mod' stat_button 'fw_attrib' '$(lang de:"Attribute bereinigen" en:"Cleanup attributes")' cgi_end