Add Ram info to Rocknix Info
This commit is contained in:
parent
097cb81d62
commit
014d5f2975
1 changed files with 33 additions and 1 deletions
|
@ -41,6 +41,30 @@ V_ARCH=$(uname -m)
|
|||
|
||||
[[ "$V_CPUMODEL1" ]] || V_CPUMODEL1="${HW_CPU}"
|
||||
|
||||
# ram
|
||||
MEMT=$(grep MemTotal /proc/meminfo | sed 's/[^0-9]*//g')
|
||||
MEMT=$((${MEMT} / 1000))
|
||||
MEMAV=$(grep MemAvailable /proc/meminfo | sed 's/[^0-9]*//g')
|
||||
MEMAV=$((${MEMAV} / 1000))
|
||||
CFREQ=$(cat ${DMC_FREQ}/cur_freq)
|
||||
if [ ! -z "$CFREQ}" ]; then
|
||||
CFREQ=$(($CFREQ / 1000000))
|
||||
MFREQ=$(cat ${DMC_FREQ}/max_freq)
|
||||
if [ ! -z "$MFREQ}" ]; then
|
||||
MFREQ=$(($MFREQ / 1000000))
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "RAM INFORMATION:"
|
||||
echo "RAM AVAILABLE: ${MEMAV} MB"
|
||||
echo "RAM CAPACITY: ${MEMT} MB"
|
||||
if [ ! -z "$CFREQ}" ]; then
|
||||
echo "RAM CURRENT SPEED: ${CFREQ} MHZ"
|
||||
if [ ! -z "$MFREQ}" ]; then
|
||||
echo "RAM MAX SPEED: ${MFREQ} MHZ"
|
||||
fi
|
||||
fi
|
||||
|
||||
# battery
|
||||
BATT=$(awk 'BEGIN {FS="="} /POWER_SUPPLY_CAPACITY=/ {print $2; exit}' /sys/class/power_supply/[Bb][Aa][Tt]*/uevent 2>/dev/null)
|
||||
|
||||
|
@ -81,7 +105,6 @@ echo "VERSION: ${OS_VERSION}"
|
|||
echo "BUILD ID: ${BUILD_ID:0:7} (${BUILD_BRANCH})"
|
||||
echo "KERNEL: ${V_SYSTEM} ($(uname -m))"
|
||||
echo "DISK SPACE:"
|
||||
echo "/storage: $(df -h /storage | awk '/dev/ {print $3"/"$2" ("$5")"}')"
|
||||
echo "/storage/games-internal: $(df -h /storage/games-internal | awk '/dev/ {print $3"/"$2" ("$5")"}')"
|
||||
echo "/storage/games-external: $(df -h /storage/games-external | awk '/dev/ {print $3"/"$2" ("$5")"}')"
|
||||
|
||||
|
@ -137,5 +160,14 @@ case ${HW_ARCH} in
|
|||
done
|
||||
;;
|
||||
esac
|
||||
echo "RAM INFORMATION:"
|
||||
echo "RAM AVAILABLE: ${MEMAV} MB"
|
||||
echo "RAM CAPACITY: ${MEMT} MB"
|
||||
if [ ! -z "$CFREQ}" ]; then
|
||||
echo "RAM CURRENT SPEED: ${CFREQ} MHZ"
|
||||
if [ ! -z "$MFREQ}" ]; then
|
||||
echo "RAM MAX SPEED: ${MFREQ} MHZ"
|
||||
fi
|
||||
fi
|
||||
|
||||
info_quirks
|
||||
|
|
Loading…
Reference in a new issue