Skip to content

Commit

Permalink
Merge branch 'devel' for v2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierBerger committed Aug 26, 2017
2 parents 2acb530 + f09a861 commit d096103
Show file tree
Hide file tree
Showing 26 changed files with 724 additions and 60 deletions.
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,29 @@ all:
install:
@echo "Installing RPi-Monitor in ${TARGETDIR}"
@mkdir -p ${TARGETDIR}var/lib/rpimonitor
@cp -a src/var/lib/rpimonitor/* ${TARGETDIR}var/lib/rpimonitor/
@cp -r src/var/lib/rpimonitor/* ${TARGETDIR}var/lib/rpimonitor/
@mkdir -p ${TARGETDIR}etc/rpimonitor
@cp -a src/etc/rpimonitor/* ${TARGETDIR}etc/rpimonitor/
@cp -r src/etc/rpimonitor/* ${TARGETDIR}etc/rpimonitor/
@mkdir -p ${TARGETDIR}etc/cron.d
@cp -a src/etc/cron.d/* ${TARGETDIR}etc/cron.d/
@cp -r src/etc/cron.d/* ${TARGETDIR}etc/cron.d/
@mkdir -p ${TARGETDIR}usr/bin
@cp -a src/usr/bin/* ${TARGETDIR}usr/bin/
@cp -r src/usr/bin/* ${TARGETDIR}usr/bin/
@mkdir -p ${TARGETDIR}usr/share/rpimonitor
@cp -a src/usr/share/rpimonitor/* ${TARGETDIR}usr/share/rpimonitor/
@cp -r src/usr/share/rpimonitor/* ${TARGETDIR}usr/share/rpimonitor/
@echo "Startup system is ${STARTUPSYS}"
ifeq (${STARTUPSYS},sysVinit)
@mkdir -p ${TARGETDIR}etc/init.d
@cp -a src/etc/init.d/* ${TARGETDIR}etc/init.d/
@cp -r src/etc/init.d/* ${TARGETDIR}etc/init.d/
endif
ifeq (${STARTUPSYS},upstart)
@mkdir -p ${TARGETDIR}etc/init
@cp -a src/etc/init/* ${TARGETDIR}etc/init/
@cp -r src/etc/init/* ${TARGETDIR}etc/init/
endif
ifeq (${STARTUPSYS},systemd)
@mkdir -p ${TARGETDIR}usr/lib/systemd/system
@cp -a usr/lib/systemd/system/* ${TARGETDIR}etc/init.d/
@cp -r src/usr/lib/systemd/system/* ${TARGETDIR}etc/systemd/system/
endif
@echo "Installation completed"

clean:
@echo
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ to not start the embeded web server and use an external web server to deliver th

### Screenshot

You will find screenshot of [**RPi-Monitor**](http://rpi-experiences.blogspot.fr/) in [RPi-Monitor Overview]
(http://rpi-experiences.blogspot.fr/p/rpi-monitor.html).
You can find screenshots of [**RPi-Monitor**](http://rpi-experiences.blogspot.fr/) in [RPi-Monitor Overview](http://rpi-experiences.blogspot.fr/p/rpi-monitor.html).

### Installation

Expand All @@ -41,20 +40,19 @@ Debian package for **Raspbian** is available in [here](https://github.com/Xavier

The dependencies and the detail of installation process are describe into [PACKAGING.md](PACKAGING.md)

For installation on other system and for advanced customization read the article [RPi-Monitor: Version 2.0 advance usage and customization] (http://rpi-experiences.blogspot.fr/2013/06/rpi-monitor-version-20-advance-usage.html).
For installation on other system and for advanced customization read the article [RPi-Monitor: Version 2.0 advance usage and customization](http://rpi-experiences.blogspot.fr/2013/06/rpi-monitor-version-20-advance-usage.html).

Note: *"For various reasons"* **OpenElec** don't maintain a package repository. **RPi-Monitor** will then not be available on this distribution until the development team does the job.

### Other information

All articles realated to RPi-Monitor are gathered into the page [RPi-Monitor Overview]
(http://rpi-experiences.blogspot.fr/p/rpi-monitor-articles.html).
All articles related to RPi-Monitor are gathered into the page [RPi-Monitor Overview](http://rpi-experiences.blogspot.fr/p/rpi-monitor-articles.html).

Frequently Asked Question find answer into the [FAQ](http://rpi-experiences.blogspot.fr/p/rpi-monitor-faq.html) page.

### Development

Github is used to perform versionning of development and also to backup the development progress of future releases.
GitHub is used to perform versioning of development and also to backup the development progress of future releases.

The branch **master** contains the latest stable version.

Expand All @@ -68,14 +66,14 @@ You want to contribute to RPi-Monitor. I'll be happy to integrate your pull requ
Please note: Pull request perfomed on **devel** branch will be integrated as soon as possible. Pull request perform on master branche may only be integrated when a new version is published (or not may not be integrated at all...)


### **RPi-Monitor** used in other product
### **RPi-Monitor** used in other projects

**RPi-monitor** is also used as part of other product:
**RPi-monitor** is also used as part of other projects:

* **[Tor-Info](https://github.com/lzkill/tor-info)** Configuration file, script and documentation to extend **RPi-Monitor** for showing a Tor relay's information.


###Author
### Author

**Author**: Xavier Berger

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.11
2.12
4 changes: 1 addition & 3 deletions src/etc/init.d/rpimonitor
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ install_auto_package_status_update() {

cat > /etc/apt/apt.conf.d/99rpimonitor << EOF
# Update rpimonitor status
DPkg {
Post-Invoke {
APT::Update::Post-Invoke {
"echo 'Update rpimonitor Packages Status' && /usr/share/rpimonitor/scripts/updatePackagesStatus.pl";
};
};
EOF

Expand Down
4 changes: 4 additions & 0 deletions src/etc/rpimonitor/daemon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
# Define the data storage directory (Default:/var/lib/rpimonitor)
#daemon.datastore=/var/lib/rpimonitor
#
# daemon.logfile=/var/log/rpimonitor
# Define directory where logs are stored (Default:/var/log/rpimonitor)
# daemon.logfile=/var/log/rpimonitor
#
# daemon.shellinabox=https://0.0.0.0:4200/
# Define shellinabox address (Default: calculated automatically based on http request)
#daemon.shellinabox=https://127.0.0.1:4200/
88 changes: 88 additions & 0 deletions src/etc/rpimonitor/template/Allwinner_H3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
########################################################################
# Extract H3 information
# Page: 1
# Information Status Statistics
# - cpu frequency - yes - yes
# - cpu load 1, 5, 15 - yes - yes
# - cpu scaling governor - yes - no
# - cpus available - yes - yes
# - dram frequency - yes - yes
# - zone1/SoC temperature - yes - yes
########################################################################
dynamic.1.name=cpu_frequency
dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
dynamic.1.regexp=(.*)
dynamic.1.postprocess=sprintf("%.3f", $1/1000000)
dynamic.1.rrd=GAUGE

dynamic.2.name=load1,load5,load15
dynamic.2.source=/proc/loadavg
dynamic.2.regexp=^(\S+)\s(\S+)\s(\S+)
dynamic.2.postprocess=
dynamic.2.rrd=GAUGE

dynamic.3.name=scaling_governor
dynamic.3.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
dynamic.3.regexp=(.*)
dynamic.3.postprocess=
dynamic.3.rrd=

dynamic.4.name=cpu_count
dynamic.4.source=/usr/bin/expr 1 + `/usr/bin/awk -F": " '/^processor/ {print $2}' < /proc/cpuinfo | /usr/bin/tail -n1`
dynamic.4.regexp=(.*)
dynamic.4.postprocess=
dynamic.4.rrd=GAUGE

dynamic.5.name=dram_frequency
dynamic.5.source=/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/cur_freq
dynamic.5.regexp=(.*)
dynamic.5.postprocess=sprintf("%.3f", $1/1000000)
dynamic.5.rrd=GAUGE

dynamic.6.name=soctemp
dynamic.6.source=/sys/class/thermal/thermal_zone1/temp
dynamic.6.regexp=(.*)
#dynamic.6.postprocess=sprintf("%.1f", $1/1000)
dynamic.6.postprocess=
dynamic.6.rrd=GAUGE

dynamic.7.name=zone0
dynamic.7.source=/sys/class/thermal/thermal_zone0/temp
dynamic.7.regexp=(.*)
dynamic.7.postprocess=
dynamic.7.rrd=GAUGE

web.status.1.content.1.name=CPU
web.status.1.content.1.icon=cpu.png
#web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]"
web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, 3, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, 3, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, 3, 100, 80)
web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "GHz</b> &nbsp;DRAM frequency: <b>" + data.dram_frequency + "GHz</b>"
web.status.1.content.1.line.3="Governor: <b>" + data.scaling_governor + "</b> &nbsp;Active CPU cores: <b>" + data.cpu_count + "</b>"

web.status.1.content.3.name=Temperature
web.status.1.content.3.icon=cpu_temp.png
web.status.1.content.3.line.1=JustGageBar("SoC", "°C",0, data.soctemp , 100,100,80,percentColors,50,70)

web.statistics.1.content.1.name=Load / Clockspeeds / Temperature
web.statistics.1.content.1.graph.1=load1
web.statistics.1.content.1.graph.2=load5
web.statistics.1.content.1.graph.3=load15
web.statistics.1.content.1.graph.4=cpu_frequency
web.statistics.1.content.1.graph.5=dram_frequency
web.statistics.1.content.1.graph.6=cpu_count
web.statistics.1.content.1.graph.7=soctemp
web.statistics.1.content.1.graph.8=zone0
web.statistics.1.content.1.ds_graph_options.load1.label=Load 1 min
web.statistics.1.content.1.ds_graph_options.load5.label=Load 5 min
web.statistics.1.content.1.ds_graph_options.load15.label=Load 15 min
web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=CPU Clock speed (GHz)
web.statistics.1.content.1.ds_graph_options.cpu_frequency.yaxis=2
web.statistics.1.content.1.ds_graph_options.dram_frequency.label=DRAM Clock speed (GHz)
web.statistics.1.content.1.ds_graph_options.dram_frequency.yaxis=2
web.statistics.1.content.1.ds_graph_options.cpu_count.label=Active CPUs
web.statistics.1.content.1.ds_graph_options.cpu_count.yaxis=2
web.statistics.1.content.1.ds_graph_options.soctemp.label=SoC temp (°C)
web.statistics.1.content.1.ds_graph_options.zone0.label=zone0 temp (°C)
web.statistics.1.content.1.graph_options.y1axis={ position: "left", min: 35, max: 75 }
web.statistics.1.content.1.graph_options.y2axis={ position: "right" }

142 changes: 142 additions & 0 deletions src/etc/rpimonitor/template/Allwinner_H3_Extended.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
########################################################################
# Extract H3 information -- extended version
# Page: 1
# Information Status Statistics
# - cpu frequency - yes - yes
# - dram frequency - yes - yes
# - average load 1, 5, 15 - yes - yes
# - detailed cpu load - yes - yes
# - cpu scaling governor - yes - no
# - cpus available - yes - yes
# - zone1/SoC temperature - yes - yes
# - disk temperature - yes - yes
# - external temperature - yes - no
# - Vcore voltage - yes - yes
# - cooling state - yes - yes
########################################################################
dynamic.1.name=cpu_frequency
dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
dynamic.1.regexp=(.*)
dynamic.1.postprocess=sprintf("%.3f", $1/1000000)
dynamic.1.rrd=GAUGE

dynamic.2.name=load1,load5,load15
dynamic.2.source=/proc/loadavg
dynamic.2.regexp=^(\S+)\s(\S+)\s(\S+)
dynamic.2.postprocess=
dynamic.2.rrd=GAUGE

dynamic.3.name=scaling_governor
dynamic.3.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
dynamic.3.regexp=(.*)
dynamic.3.postprocess=
dynamic.3.rrd=

dynamic.4.name=cpu_count
dynamic.4.source=/usr/bin/expr 1 + `/usr/bin/awk -F": " '/^processor/ {print $2}' < /proc/cpuinfo | /usr/bin/tail -n1`
dynamic.4.regexp=(.*)
dynamic.4.postprocess=
dynamic.4.rrd=GAUGE

dynamic.5.name=dram_frequency
dynamic.5.source=/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/cur_freq
dynamic.5.regexp=(.*)
dynamic.5.postprocess=sprintf("%.3f", $1/1000000)
dynamic.5.rrd=GAUGE

dynamic.6.name=soctemp
dynamic.6.source=/sys/class/thermal/thermal_zone1/temp
dynamic.6.regexp=(.*)
#dynamic.6.postprocess=sprintf("%.1f", $1/1000)
dynamic.6.postprocess=
dynamic.6.rrd=GAUGE

dynamic.7.name=externaltemp
dynamic.7.source=/tmp/externaltemp
dynamic.7.regexp=(.*)
dynamic.7.postprocess=sprintf("%.1f", $1/1000)
dynamic.7.rrd=GAUGE

dynamic.8.name=disktemp
dynamic.8.source=/tmp/disktemp
dynamic.8.regexp=(.*)
dynamic.8.postprocess=sprintf("%.1f", $1/1000)
dynamic.8.rrd=GAUGE

dynamic.9.name=vcorevoltage
dynamic.9.source=/tmp/VCore
dynamic.9.regexp=(.*)
dynamic.9.postprocess=sprintf("%.2f", $1/1000)
dynamic.9.rrd=GAUGE

dynamic.10.name=cpu_stat,system_stat,user_stat,nice_stat,iowait_stat,irq_stat
dynamic.10.source=/tmp/cpustat
dynamic.10.regexp=^(\S+)\s(\S+)\s(\S+)\s(\S+)\s(\S+)\s(\S+)
dynamic.10.postprocess=
dynamic.10.rrd=GAUGE

dynamic.11.name=coolingstate
dynamic.11.source=/sys/devices/virtual/thermal/cooling_device0/cur_state
dynamic.11.regexp=(.*)
dynamic.11.postprocess=
dynamic.11.rrd=GAUGE

web.status.1.content.1.name=CPU
web.status.1.content.1.icon=cpu.png
web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, 3, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, 3, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, 3, 100, 80)
web.status.1.content.1.line.2="CPU total: <b>" + data.cpu_stat + "%</b> (Sys: " + data.system_stat + "%, User: " + data.user_stat + "%, I/O wait: " + data.iowait_stat + "%, Nice: " + data.nice_stat + "%)"
web.status.1.content.1.line.3="CPU frequency: <b>" + data.cpu_frequency + "GHz</b> &nbsp;DRAM frequency: <b>" + data.dram_frequency + "GHz</b>"
web.status.1.content.1.line.4="Governor: <b>" + data.scaling_governor + "</b> &nbsp;Active CPU cores: <b>" + data.cpu_count + "</b> &nbsp;Vcore: <b>" + data.vcorevoltage + "</b>"

web.status.1.content.3.name=Temperature
web.status.1.content.3.icon=cpu_temp.png
#web.status.1.content.3.line.1=JustGageBar("SoC", "°C",0, data.soctemp , 100,100,80,percentColors,50,70)+" "+JustGageBar("Disk", "°C",0, data.disktemp , 100,100,80,percentColors,40,50)+" "+JustGageBar("München", "°C",0, data.externaltemp , 100,100,80,percentColors,30,35)
web.status.1.content.3.line.1=JustGageBar("SoC", "°C",0, data.soctemp , 100,100,80,percentColors,50,70)+" "+JustGageBar("Disk", "°C",0, data.disktemp , 100,100,80,percentColors,40,50)+" "+JustGageBar("Cooling State", "",0, data.coolingstate , 5,100,80,percentColors,1,2)

web.statistics.1.content.1.name=Load / Clockspeeds / Temperature
web.statistics.1.content.1.graph.1=load1
web.statistics.1.content.1.graph.2=load5
web.statistics.1.content.1.graph.3=load15
web.statistics.1.content.1.graph.4=cpu_frequency
web.statistics.1.content.1.graph.5=dram_frequency
web.statistics.1.content.1.graph.6=cpu_count
web.statistics.1.content.1.graph.7=soctemp
web.statistics.1.content.1.graph.8=vcorevoltage
web.statistics.1.content.1.graph.9=disktemp
web.statistics.1.content.1.graph.10=cpu_stat
web.statistics.1.content.1.graph.11=coolingstate
web.statistics.1.content.1.ds_graph_options.load1.label=Load 1 min
web.statistics.1.content.1.ds_graph_options.load5.label=Load 5 min
web.statistics.1.content.1.ds_graph_options.load15.label=Load 15 min
web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=CPU Clock speed (GHz)
web.statistics.1.content.1.ds_graph_options.cpu_frequency.yaxis=2
web.statistics.1.content.1.ds_graph_options.dram_frequency.label=DRAM Clock speed (GHz)
web.statistics.1.content.1.ds_graph_options.dram_frequency.yaxis=2
web.statistics.1.content.1.ds_graph_options.cpu_count.label=Active CPUs
web.statistics.1.content.1.ds_graph_options.cpu_count.yaxis=2
web.statistics.1.content.1.ds_graph_options.soctemp.label=SoC temp (°C)
web.statistics.1.content.1.ds_graph_options.disktemp.label=Disk temp (°C)
web.statistics.1.content.1.ds_graph_options.vcorevoltage.label=Vcore (V)
web.statistics.1.content.1.ds_graph_options.vcorevoltage.yaxis=2
web.statistics.1.content.1.ds_graph_options.coolingstate.label=Cooling State
web.statistics.1.content.1.ds_graph_options.coolingstate.yaxis=2
web.statistics.1.content.1.ds_graph_options.cpu_stat.label=CPU total (%)
web.statistics.1.content.1.graph_options.y1axis={ position: "left", min: 35, max: 75 }
web.statistics.1.content.1.graph_options.y2axis={ position: "right" }

web.statistics.1.content.2.name=Detailed CPU Stats
web.statistics.1.content.2.graph.1=cpu_stat
web.statistics.1.content.2.graph.2=system_stat
web.statistics.1.content.2.graph.3=user_stat
web.statistics.1.content.2.graph.4=nice_stat
web.statistics.1.content.2.graph.5=iowait_stat
web.statistics.1.content.2.graph.6=irq_stat
web.statistics.1.content.2.ds_graph_options.cpu_stat.label=CPU total (%)
web.statistics.1.content.2.ds_graph_options.system_stat.label=System (%)
web.statistics.1.content.2.ds_graph_options.user_stat.label=User (%)
web.statistics.1.content.2.ds_graph_options.nice_stat.label=Nice (%)
web.statistics.1.content.2.ds_graph_options.iowait_stat.label=I/O wait (%)
web.statistics.1.content.2.ds_graph_options.irq_stat.label=IRQ/softirq (%)
web.statistics.1.content.2.graph_options.y1axis={ position: "left", min: 0, max: 100 }


16 changes: 16 additions & 0 deletions src/etc/rpimonitor/template/OrangePi_H3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
web.page.icon='img/logo.png'
web.page.menutitle='OPi-Monitor <sub>('+data.hostname+')</sub>'
web.page.pagetitle='OPi-Monitor ('+data.hostname+')'

web.status.1.name=Orange Pi
web.statistics.1.name=Orange Pi

include=/etc/rpimonitor/template/version.conf
include=/etc/rpimonitor/template/uptime.conf
#include=/etc/rpimonitor/template/Allwinner_H3.conf
include=/etc/rpimonitor/template/Allwinner_H3_Extended.conf
include=/etc/rpimonitor/template/memory.conf
#include=/etc/rpimonitor/template/swap.conf
include=/etc/rpimonitor/template/sdcard.conf
include=/etc/rpimonitor/template/network.conf

4 changes: 2 additions & 2 deletions src/etc/rpimonitor/template/dht11.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ dynamic.2.rrd=GAUGE
# Add a line of status in page number 2
web.status.2.content.1.name=Temperature
web.status.2.content.1.icon=cpu_temp.png
web.status.2.content.1.line.1="Ambiant Temperature: <b>"+data.living_room_temp+"&deg;C</b>"
web.status.2.content.1.line.2="Ambiant Humidity: <b>"+data.humidity+"%</b>"
web.status.2.content.1.line.1="Ambient Temperature: <b>"+data.living_room_temp+"&deg;C</b>"
web.status.2.content.1.line.2="Ambient Humidity: <b>"+data.humidity+"%</b>"

# Add a statistic graph (with 2 curves suing separate scales) in page number 2
web.statistics.2.content.1.name=Temperature
Expand Down
4 changes: 2 additions & 2 deletions src/etc/rpimonitor/template/memory.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dynamic.9.postprocess=$1/1024
dynamic.9.rrd=GAUGE

dynamic.15.name=memory_available
dynamic.15.source=/usr/bin/free -mk
dynamic.15.regexp=^-\/\+ buffers\/cache:\s+\d+\s+(\d+)
dynamic.15.source=/proc/meminfo
dynamic.15.regexp=MemAvailable:\s+(\d+)
dynamic.15.postprocess=$1/1024
dynamic.15.rrd=GAUGE

Expand Down
Loading

0 comments on commit d096103

Please sign in to comment.