From 0f13703d32b6b80e8fe5620f0456f3fbf52233c6 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Wed, 2 Feb 2022 22:20:19 +0100 Subject: [PATCH 1/6] v8.1 DietPi-Software | RPI-Monitor - fix an issue to display CPU Temperature correctly --- dietpi/dietpi-software | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b2cff7b9f1..38d5d72141 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8795,6 +8795,9 @@ _EOF_ # Update APT package status G_EXEC /usr/share/rpimonitor/scripts/updatePackagesStatus.pl + # Fix issue to display CPU Temperature correctly https://github.com/XavierBerger/RPi-Monitor/issues/374 + G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=$1/1000' /etc/rpimonitor/template/temperature.conf + # USB drive stats implementation by Rich if [[ ! -f '/etc/rpimonitor/template/usb_hdd.conf' ]] && findmnt -S /dev/sda1 > /dev/null then From 44f79dd421f1242976d63ebfbbf9b110970936d8 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Thu, 3 Feb 2022 00:12:37 +0100 Subject: [PATCH 2/6] v8.1 DietPi-Software | RPI-Monitor - change on how temperature is displayed --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 38d5d72141..cc53fcf16a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8796,7 +8796,7 @@ _EOF_ G_EXEC /usr/share/rpimonitor/scripts/updatePackagesStatus.pl # Fix issue to display CPU Temperature correctly https://github.com/XavierBerger/RPi-Monitor/issues/374 - G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=$1/1000' /etc/rpimonitor/template/temperature.conf + G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=int($1/1000 + 0.5)' /etc/rpimonitor/template/temperature.conf # USB drive stats implementation by Rich if [[ ! -f '/etc/rpimonitor/template/usb_hdd.conf' ]] && findmnt -S /dev/sda1 > /dev/null From b606d60ba8aaab1236582117faa48bbdfd40fbf7 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Thu, 3 Feb 2022 00:16:02 +0100 Subject: [PATCH 3/6] v8.1 DietPi-Software | RPI-Monitor - satisfy shellcheck --- dietpi/dietpi-software | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cc53fcf16a..1280f2f57d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8796,6 +8796,7 @@ _EOF_ G_EXEC /usr/share/rpimonitor/scripts/updatePackagesStatus.pl # Fix issue to display CPU Temperature correctly https://github.com/XavierBerger/RPi-Monitor/issues/374 + # shellcheck disable=SC2016# shellcheck disable=SC2016 G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=int($1/1000 + 0.5)' /etc/rpimonitor/template/temperature.conf # USB drive stats implementation by Rich From ad17d7e2c289634da23e77fcee3a7c17ecc01d29 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 3 Feb 2022 02:06:10 +0100 Subject: [PATCH 4/6] v8.1 - DietPi-Software | RPi-Monitor: Show up to two decimal numbers with fixed CPU temperature - DietPi-Software | RPi-Monitor: Do not add USB HDD gauge when it is the rootfs, since it is then covered by "SD card" already (misleading but all info is there). Support non-ext4 USB HDDs, be a little more strict when parsing "df" and replace postprocess with "df -m" flag --- dietpi/dietpi-software | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1280f2f57d..a965fb7021 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1136,7 +1136,7 @@ INDEX_BROWSER=$INDEX_BROWSER" software_id=66 aSOFTWARE_NAME[$software_id]='RPi-Monitor' - aSOFTWARE_DESC[$software_id]='Web interface for Raspberry Pi real time monitoring' + aSOFTWARE_DESC[$software_id]='Web interface for Raspberry Pi real-time monitoring' aSOFTWARE_CATX[$software_id]=8 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/system_stats/#rpi-monitor' # RPi only @@ -8795,14 +8795,13 @@ _EOF_ # Update APT package status G_EXEC /usr/share/rpimonitor/scripts/updatePackagesStatus.pl - # Fix issue to display CPU Temperature correctly https://github.com/XavierBerger/RPi-Monitor/issues/374 - # shellcheck disable=SC2016# shellcheck disable=SC2016 - G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=int($1/1000 + 0.5)' /etc/rpimonitor/template/temperature.conf + # Fix issue to display CPU temperature correctly: https://github.com/XavierBerger/RPi-Monitor/issues/374 + # shellcheck disable=SC2016 + G_CONFIG_INJECT 'dynamic.1.postprocess=' 'dynamic.1.postprocess=int($1/10 + 0.5)/100' /etc/rpimonitor/template/temperature.conf # USB drive stats implementation by Rich - if [[ ! -f '/etc/rpimonitor/template/usb_hdd.conf' ]] && findmnt -S /dev/sda1 > /dev/null + if [[ $G_ROOTFS_DEV != '/dev/sda2' && ! -f '/etc/rpimonitor/template/usb_hdd.conf' ]] && findmnt -S /dev/sda1 > /dev/null then - G_EXEC sed -i '\|include=/etc/rpimonitor/template/sdcard.conf|a\include=/etc/rpimonitor/template/usb_hdd.conf' /etc/rpimonitor/data.conf cat << '_EOF_' > /etc/rpimonitor/template/usb_hdd.conf ######################################################################## # Extract USB HDD (sda1) information @@ -8812,14 +8811,12 @@ _EOF_ # - USBHDD1 used - yes - yes ######################################################################## static.10.name=usbhdd_total -static.10.source=df -t ext4 -static.10.regexp=sda1\s+(\d+) -static.10.postprocess=$1/1024 +static.10.source=df -m +static.10.regexp=^/dev/sda1\s+(\d+) dynamic.14.name=usbhdd_used -dynamic.14.source=df -t ext4 -dynamic.14.regexp=sda1\s+\d+\s+(\d+) -dynamic.14.postprocess=$1/1024 +dynamic.14.source=df -m +dynamic.14.regexp=^/dev/sda1\s+\d+\s+(\d+) dynamic.14.rrd=GAUGE web.status.1.content.9.name=USB HDD @@ -8830,12 +8827,13 @@ web.status.1.content.9.line.2=ProgressBar(data.usbhdd_used,data.usbhdd_total) web.statistics.1.content.9.name=USB HDD web.statistics.1.content.9.graph.1=usbhdd_total web.statistics.1.content.9.graph.2=usbhdd_used -web.statistics.1.content.9.ds_graph_options.usbhdd_total.label=USB HDD total space (MB) +web.statistics.1.content.9.ds_graph_options.usbhdd_total.label=USB HDD total space (MiB) web.statistics.1.content.9.ds_graph_options.usbhdd_total.color="#FF7777" -web.statistics.1.content.9.ds_graph_options.usbhdd_used.label=USB HDD used space (MB) +web.statistics.1.content.9.ds_graph_options.usbhdd_used.label=USB HDD used space (MiB) web.statistics.1.content.9.ds_graph_options.usbhdd_used.lines={ fill: true } web.statistics.1.content.9.ds_graph_options.usbhdd_used.color="#7777FF" _EOF_ + G_EXEC sed -i '\|include=/etc/rpimonitor/template/sdcard.conf|a\include=/etc/rpimonitor/template/usb_hdd.conf' /etc/rpimonitor/data.conf fi fi From 51adaefae20d63acb80ac26f7e6f792031cebe71 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 3 Feb 2022 02:08:31 +0100 Subject: [PATCH 5/6] v8.1 - CHANGELOG | RPi-Monitor: Resolved an issue where the CPU temperature was not shown. Many thanks to @KamikazeePL for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=10001 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1aeafc8ae2..5a2c7012f9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -25,6 +25,7 @@ Fixes: - DietPi-Software | OpenBazaar: Since the original project has been taken down, we migrated to a fork which keeps up the marketplace for the community: https://github.com/MichaIng/DietPi/issues/5213 - DietPi-Software | X.Org X Server: Resolved an issue where VMs without KMS/DRM support failed to start the X server, e.g. Hyper-V. The classic framebuffer DDX is now installed when no KMS/DRM support is detected on VMs. - DietPi-Software | Box86/Box64: Resolved an issue where the install failed when a kernel upgrade has just been done so that the "binfmt_misc" kernel module cannot be found for the loaded kernel. +- DietPi-Software | RPi-Monitor: Resolved an issue where the CPU temperature was not shown. Many thanks to @KamikazeePL for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=10001 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/5229 From ea8b46f99ed8aabb22fd929de6df24882a0c9e09 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Thu, 3 Feb 2022 02:14:47 +0100 Subject: [PATCH 6/6] v8.1 DietPi-Software | RPI-Monitor - fix typo --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a965fb7021..409788b669 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8821,7 +8821,7 @@ dynamic.14.rrd=GAUGE web.status.1.content.9.name=USB HDD web.status.1.content.9.icon=usb_hdd.png -web.status.1.content.9.line.1="/sda1 Used: "+KMG(data.usbhdd_used,'M')+" ("+Percent(data.udbhdd_used,data.usbhdd_total,'M')+") Free: "+KMG(data.usbhdd_total-data.usbhdd_used,'M')+ " Total: "+ KMG(data.usbhdd_total,'M') +"" +web.status.1.content.9.line.1="/sda1 Used: "+KMG(data.usbhdd_used,'M')+" ("+Percent(data.usbhdd_used,data.usbhdd_total,'M')+") Free: "+KMG(data.usbhdd_total-data.usbhdd_used,'M')+ " Total: "+ KMG(data.usbhdd_total,'M') +"" web.status.1.content.9.line.2=ProgressBar(data.usbhdd_used,data.usbhdd_total) web.statistics.1.content.9.name=USB HDD