aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2013-08-19 20:31:59 +0100
committerStuart Shelton <stuart@shelton.me>2013-08-19 20:31:59 +0100
commit0794d681ccd2da0bebb3789f7f25121de505b13f (patch)
tree5eef1a1b767b219dc4a6e850167530ad81f2d660
parentsys-apps/tmpfs-1.0-r1 (diff)
downloadsrcshelton-0794d681ccd2da0bebb3789f7f25121de505b13f.tar.gz
srcshelton-0794d681ccd2da0bebb3789f7f25121de505b13f.tar.bz2
srcshelton-0794d681ccd2da0bebb3789f7f25121de505b13f.zip
www-apps/rpi-monitor-2.3
-rw-r--r--www-apps/rpi-monitor/Manifest8
-rw-r--r--www-apps/rpi-monitor/files/default.conf-2.2.patch (renamed from www-apps/rpi-monitor/files/default.conf.patch)2
-rw-r--r--www-apps/rpi-monitor/files/default.conf-2.3.patch539
-rw-r--r--www-apps/rpi-monitor/rpi-monitor-2.2.ebuild10
-rw-r--r--www-apps/rpi-monitor/rpi-monitor-2.3.ebuild121
5 files changed, 675 insertions, 5 deletions
diff --git a/www-apps/rpi-monitor/Manifest b/www-apps/rpi-monitor/Manifest
index ca94bfc4..5e18ca88 100644
--- a/www-apps/rpi-monitor/Manifest
+++ b/www-apps/rpi-monitor/Manifest
@@ -1,6 +1,10 @@
-AUX default.conf.patch 24353 SHA256 d1c071ccd76eee2150ff979db974773da9f82c574dd2df6a76aa09ed1eb7534a SHA512 404abbc90c14bf88ea93ff057785a4bfbd163f1a86bb74916d9d32b42ea8b2a37214d96df3b8da23b6a366aa8744bf55816009f3f191f5c49d9139effd886211 WHIRLPOOL 04e4a7fa4150084139bbcb75aa6cc870821cd4b762b78bd2ef0cbe925db86eb05343e63ea7de9ef9f8a435fbabaa28a4828a9017b0e8675a50fcf1a12d3ba4c3
+AUX default.conf-2.2.patch 24352 SHA256 f4eb0086d55cdda1889073bd8894f7bf203d997d15eff4170e1ff22b23f71094 SHA512 1ea81937d8c6a2b39aab951f4cb4fd3c0a6c9d63d2147ff0aff249a543efb3f574841c8d320fe88d463cdec8c1424f9abf3b8ceb018135d9d5d034c29e682f20 WHIRLPOOL b356e732c26eed507b06fa80d333d83425a93d51a20ad935f7fbcf9de2124010d4e2ddbee37da21ddfd4d9990335aa54db6e65d9825e7ac769bb4118824df849
+AUX default.conf-2.3.patch 24271 SHA256 a6a890f808e57815fee2c2c513c8c423697d9744a56bad4a530994872ccf4ea8 SHA512 cdeef3311411c5110ea4c12c33253104f7edde4a9405212c4236dcb3cd61304ce5fded8ddb534be33f5559172c1af3236138b2d36a6128b98b53a6a5354affcc WHIRLPOOL 4763fd2d5d6620a30993852615f22a6b4dcae10967e681ba661fa3f5a6e41e6721f21b0497441058a65cd0b9f4f01c0e8b2a04560f637e9644dbe3bc37026544
AUX rpimonitor.confd 112 SHA256 b683366153e78b3f2e3040036315ed4bb6e97f6963dde609b3099551dc84795a SHA512 46c2f4340023f8b7957f604f1baa661eb4a97f54a2f6a03abf25525d9c7db78135dc556866cea416080398e6af84c7ac6c935e4230154f5164cb1535607e3395 WHIRLPOOL 869fc2d100e725d3f171d509b6bd997b9f9ada00600c237b30f8e6951cd7dc4fe4be2d72e343dba9caaab1b61c741cd3422cf137dd94bd7571be0c837d447ece
AUX rpimonitor.initd 973 SHA256 d9ae46e6fa0eaef295736fc9bfc9b4c8af000d67bf4b102375c3ba21610e8653 SHA512 e9bab0b0f1fe8cb6425fa3ddef157df28ef3be344927dbff9d216cb57e31c57a7b79181999fa067e69c62364f5eb1a665d21efdbfd82fdf7dc8b1d54c9efbd1d WHIRLPOOL 3714306bc6b33150dd0ecb3128d044099ecaa92ac4c77b33f1289060bd6112671c8ea764715e3aabfbfd9ee962d6beecc20b180bc2b2583856467e75d0f86a2b
DIST rpi-monitor-2.2.zip 292550 SHA256 e37f4be434c47a48c22e4db649e7960c9ab2e6c8851187a2628b71225121f25e SHA512 731a229097e7472e357af2b52ebebfeae65f73f91a44b3bb7c09c7ce72ddb55e2cdb1b03a9147094c359330a0e12e1b5ad9c754f2a3ce70e5a7287980643f4cc WHIRLPOOL 153e6e9a33c71255a787fceeb74d6f0c1ca15079682296f4971882781c62bc241a323ce9f1d91fa49cc5d2b4f541ae94b2da844bdc27ba2809cba1ffa02c1e5d
+DIST rpi-monitor-2.3.zip 292742 SHA256 67b458800d13dae4a1ccc38c11f1164c3438526c61f57ee810e5b9957399307f SHA512 90bfde85aad88425db8ed53a78e1e049ffecbe778ffae2fbc66915fa7e242b11e61a6ae5c6eb2805b326df8a0023d1b1d666f6c1fa21e68b9256c4e13c209fbc WHIRLPOOL 3b31bbf7c30da8111e6b8030f39513524ffe98dd74c95cdd48634229c7c1eb040abf183f5160a408a107c58a088de22aa34cfe37ca5ebe3133db2575a5b6bb56
DIST rpi-monitor-deb-2.2.zip 2127268 SHA256 04bd659402cda83df2d34fb38efce4db710f1c63ec41e1905cca9d4d3b41f516 SHA512 ed51fec16b0c23fe73c9b733d4cf8f655089d13c408803970a834d1f5c3a71df026814dd2b6d2ea0759e533e154185beca70eb7048468566cef55fb4ac7b6c2f WHIRLPOOL 006bb1f20f1d6e54e73e1f7f8b6eeb85e75219190450dcd16d2104f555f75dc5751034b1f62af7923137da260f730390c2d668860825cd61d4d6548a23f0e1b3
-EBUILD rpi-monitor-2.2.ebuild 3087 SHA256 fa314d8c7132d3f5def4e1de9edc51ee33c3a44addc0b962530ca92a29ae508d SHA512 b310ade8af35780d5dd6f5b7e92dfa4d4730268e0297117826562d3d6157377566632f1caf1a120d3e0cb5f1beeeaac455e3b98f1991cdbd6fa3651d13c92366 WHIRLPOOL e8467989a31967da50c8e00800bc72155670dc511e389430e10b9d046695b90d5aafddbfeba92c92ba54f38ea827a7212a915a880a69483db3a9e71b6d4685c8
+DIST rpi-monitor-deb-2.3.zip 2393064 SHA256 63c0c6cb822c55b693a1741cdca26a316df8508049c741b0b6e8268c655b705d SHA512 88125b79ce6a0e4466c469e8e344a74eddd2aecb9c046c08251da99c90192f9174bfcb722df5ea79a979da44193b76a6b434f5a9af1d8fe2a02e5c38e0e335b8 WHIRLPOOL bb2d05510cf5577762b14dc95537ae359df979327824943d6710b2038c9982cbd67a1f712acec1f6586de9efa36a51dea841a836de4a84d2a6d03304c92dd708
+EBUILD rpi-monitor-2.2.ebuild 3466 SHA256 acb9997f49bb6662e7fef87d8c1f0f1ceb0ff6a608090a5be9e542475b891587 SHA512 333211f505096f667af8037b1a94aa80635eff5ac668002225ed32ba74cf1b6c3d79842b58b84605d3928f74bfad0ccee791396c48eb9bef1b039bfc7641b3cc WHIRLPOOL 866bb749de15a15ffd437f893306b0d3a722d3266e95357d2eba18ac4cd6c7fc036997faa7e594d860e5c210e43e47cd5b538fbd227caf34c35aecfe77b581b7
+EBUILD rpi-monitor-2.3.ebuild 3466 SHA256 acb9997f49bb6662e7fef87d8c1f0f1ceb0ff6a608090a5be9e542475b891587 SHA512 333211f505096f667af8037b1a94aa80635eff5ac668002225ed32ba74cf1b6c3d79842b58b84605d3928f74bfad0ccee791396c48eb9bef1b039bfc7641b3cc WHIRLPOOL 866bb749de15a15ffd437f893306b0d3a722d3266e95357d2eba18ac4cd6c7fc036997faa7e594d860e5c210e43e47cd5b538fbd227caf34c35aecfe77b581b7
diff --git a/www-apps/rpi-monitor/files/default.conf.patch b/www-apps/rpi-monitor/files/default.conf-2.2.patch
index 2fc11cbc..ccb6b73b 100644
--- a/www-apps/rpi-monitor/files/default.conf.patch
+++ b/www-apps/rpi-monitor/files/default.conf-2.2.patch
@@ -147,7 +147,7 @@
-static.7.postprocess=$1/1024
+static.6.name=revision
+static.6.source=/proc/cpuinfo
-+static.6.regexp=Revision\s+: 0*(\d+)
++static.6.regexp=Revision\s+: 0*(.*)
+static.6.postprocess=
+
+static.7.name=serial
diff --git a/www-apps/rpi-monitor/files/default.conf-2.3.patch b/www-apps/rpi-monitor/files/default.conf-2.3.patch
new file mode 100644
index 00000000..445a3f48
--- /dev/null
+++ b/www-apps/rpi-monitor/files/default.conf-2.3.patch
@@ -0,0 +1,539 @@
+--- rpimonitor/default.conf.dist 2013-08-19 18:55:16.823733000 +0100
++++ rpimonitor/default.conf 2013-08-19 19:11:40.119918000 +0100
+@@ -1,64 +1,73 @@
+ ########################################################################
+ # KPI extraction configuration
+ #
+-# This part of the configuration file is defining which data to
+-# extract how to extract then and when.
++# This configuration file defines how and when data should be
++# extracted.
+ #
+-# Static KPI are extracted once at rpimonitord startup. Each statistic
+-# is identified into the conf file by a line stating with the keyword
+-# static and an identifier <static data id>
++# Static items are extracted once on rpimonitord startup. Each
++# statistic is specified below by a line starting with the keyword
++# 'static' and followed by a numerical unique identifier.
+ #
+-# Each static KPI is defined by an id and with 4 parameters
++# Each static item has four further parameters:
+ #
+ # static.<static data id>.name=<data name>
+-# <data name> is a string representing the KPI or the list of KPI
+-# separated by comma. Each name has to be unique.
+-# Only alpha numerical charter and underscore are accepted.
+-#
+-# static.<static data id>.source=<data source>
+-# <data source> is a file or an executable file within the path.
+-# If the file exists, rpimonitord will read its content. If the file
+-# is not existing, rpimonirotd will try to execute it and will parse
+-# the output.
++# <data name> is the string represention the item (or comma-separated
++# items) being defined. Each name must be unique.
++# Only alpha-numeric charaters and underscores are valid in item
++# names.
++#
++# static.<static data id>.source=<data source>[,<data source,...]
++# <data source> may be a file or an executable from which content
++# can be read. If a full path is not provided, rpimonitord will
++# first attempt to read from a file with the specified name and,
++# failing this, will attempt to execute a binary of the same name
++# within any directory specified in the contents of the PATH
++# vaiable.
+ # Warning: specifying an executable by its absolute name will tell
+ # rpimonitord to read the content of the executable.1.graph.
+ #
+-# static.<static data id>.regexp=<data regexp>
+-# <data regexp> is the regular expression extracting information from
+-# data source. Regexp groups () has to be used to extract the data
+-# In case of KPI list, each group will be affected to a KPI name.
++# static.<static data id>.regexp=<data regex>
++# <data regex> is an optional regular expression which may be
++# applied to extracting information from the designated source
++# value, above. Data matching a Perl-Compatible/Extended Regular
++# Expression group (e.g. matches within round-brackets) will be
++# selected to represent this <data source>.
++# Where a list of <data source>s is being defined, each sequential
++# group match will be assigned to each <data source> in turn.
+ #
+ # static.<static data id>.postprocess=<data postprocess>
+-# <data postprocess> is an expression defining the postprocessing to
+-# be applied on result. KPI are idendified by $1. In case of list,
+-# other KPI are identified by $2, $3 .graph..
+-# This parameter will be evaluate by the command eval of perl.
+-#
+-# Dynamic KPI are extracted periodically (defined by daemon.delay)
+-# Each statistic is identified into the conf file by a line stating
+-# with the keyword dynamic and an identifier <dynamic data id>
++# <data postprocess> is an optional expression denoting any
++# postprocessing which should be applied to the raw <data source> or
++# the <data regex> output if defined.
++# The first <data source> is referenced as '$1', with further <data
++# source>s in a list being referred to as '$2', '$3', etc.
++# The expression will be evaluated via the Perl 'eval' command.
++#
++# Dynamic items are periodically evaluated with period specified by
++# 'daemon.delay' from /etc/rpimonitord.conf. Each statistic is
++# defined with the keyword 'dynamic' followed by a <dynamic data id>
++# identifier and five further parameters:
+ #
+-# Each dynamic KPI is defined by an id and with 5 parameters
+-#
+-# dynamic.<dynamic data id>.name=<data name>
++# dynamic.<dynamic data id>.name=<data name>[,<data name>,...]
+ # dynamic.<dynamic data id>.source=<data source>
+-# dynamic.<dynamic data id>.regexp=<data regexp>
++# dynamic.<dynamic data id>.regexp=<data regex>
+ # dynamic.<dynamic data id>.postprocess=<data postprocess>
+-# <data name>, <data source>, <data regexp>, <data postprocess>
+-# This 4 first parameters have the same signification as for static
+-# parameters.
+-#
+-# dynamic.<dynamic data id>.rrd=<|GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE>
+-# The 5th parameter is defining if the KPI has to be stored into a RRD
+-# database and how <|GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE>. If the
+-# parameter is defined as empty, no RRD database will be created. If
+-# this parameter is defined, a RRD database will be created and data
+-# will be stored at every extraction.
+-# Ref http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html for RRD
+-# parameter description.
+-# Note: Static values are accessible for the post processing using the
+-# variable $this->{'static'}->{'static_data_name'} and can be used.
+-# You can refer to swap data extraction to see an example.
++# <data name>, <data source>, <data regex>, and <data postprocess>
++# have the same use as when used with static items.
++#
++# dynamic.<dynamic data id>.rrd=<GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE>
++# The fifth parameter determines whether the item's data should be
++# stored in an Round-Robin Database, and how it should be
++# represented. A blank entry will prevent RRD creation.
++# See http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html for
++# details of the RRD different RRD options.
++#
++# NB: Values associated with named static items are available for use
++# during post-processing with the notation:
++#
++# $this->{'static'}->{'static_data_name'}
++#
++# See the dynamic item named 'swap_used' for a real-world example.
+ #
+ ########################################################################
+ static.1.name=distribution
+@@ -81,110 +90,150 @@
+ static.4.regexp=(?:Processor|model name)\s+: (.*)
+ static.4.postprocess=
+
+-static.5.name=memory_total
+-static.5.source=/proc/meminfo
+-static.5.regexp=MemTotal:\s+(\d+)
+-static.5.postprocess=$1/1024
+-
+-static.6.name=swap_total
+-static.6.source=/proc/meminfo
+-static.6.regexp=SwapTotal:\s+(\d+)
+-static.6.postprocess=$1/1024
+-
+-static.7.name=sdcard_root_total
+-static.7.source=df -t ext4
+-static.7.regexp=root\s+(\d+)
+-static.7.postprocess=$1/1024
+-
+-static.8.name=sdcard_boot_total
+-static.8.source=df -t vfat
+-static.8.regexp=mmcblk0p1\s+(\d+)
++static.5.name=hardware
++static.5.source=/proc/cpuinfo
++static.5.regexp=Hardware\s+: (.*)
++static.5.postprocess=
++
++static.6.name=revision
++static.6.source=/proc/cpuinfo
++static.6.regexp=Revision\s+: 0*(.*)
++static.6.postprocess=
++
++static.7.name=serial
++static.7.source=/proc/cpuinfo
++static.7.regexp=Serial\s+: (.*)
++static.7.postprocess=
++
++static.8.name=sdcard_root_total
++static.8.source=df /
++static.8.regexp=^[^\s]+\s+(\d+)
+ static.8.postprocess=$1/1024
+
++static.9.name=sdcard_boot_total
++static.9.source=df /boot
++static.9.regexp=^[^\s]+\s+(\d+)
++static.9.postprocess=$1/1024
++
++static.11.name=tmpfs_ram_total
++static.11.source=df /mnt/ram
++static.11.regexp=^[^\s]+\s+(\d+)
++static.11.postprocess=$1/1024
++
+ ##############################################################################
+-dynamic.1.name=upgrade
+-dynamic.1.source=/usr/share/rpimonitor/updatestatus.txt
+-dynamic.1.regexp=(\d+ upgraded, \d+ .*|.*&nbsp;.*)
++#dynamic.1.name=upgrade
++#dynamic.1.source=/usr/share/rpimonitor/updatestatus.txt
++#dynamic.1.regexp=(\d+ upgraded, \d+ .*|.*&nbsp;.*)
++#dynamic.1.postprocess=
++#dynamic.1.rrd=
++#
++#dynamic.2.name=packages
++#dynamic.2.source=/usr/share/rpimonitor/updatestatus.txt
++#dynamic.2.regexp=^ (.*)\d+ upgraded,
++#dynamic.2.postprocess=
++#dynamic.2.rrd=
++
++dynamic.1.name=scaling_governor
++dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
++dynamic.1.regexp=(.*)
+ dynamic.1.postprocess=
+ dynamic.1.rrd=
+
+-dynamic.2.name=packages
+-dynamic.2.source=/usr/share/rpimonitor/updatestatus.txt
+-dynamic.2.regexp=^ (.*)\d+ upgraded,
+-dynamic.2.postprocess=
+-dynamic.2.rrd=
+-
+-dynamic.3.name=cpu_frequency
+-dynamic.3.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
+-dynamic.3.regexp=(.*)
+-dynamic.3.postprocess=$1/1000
+-dynamic.3.rrd=
+-
+-dynamic.4.name=cpu_voltage
+-dynamic.4.source=vcgencmd measure_volts core
+-dynamic.4.regexp=(\d+.\d+)V
++dynamic.2.name=cpu_frequency
++dynamic.2.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
++dynamic.2.regexp=(.*)
++dynamic.2.postprocess=$1/1000
++dynamic.2.rrd=GAUGE
++
++dynamic.3.name=cpu_voltage
++dynamic.3.source=/opt/vc/bin/vcgencmd measure_volts core
++dynamic.3.regexp=(\d+.\d+)V
++dynamic.3.postprocess=
++dynamic.3.rrd=GAUGE
++
++dynamic.4.name=load1,load5,load15
++dynamic.4.source=/proc/loadavg
++dynamic.4.regexp=^(\S+)\s(\S+)\s(\S+)
+ dynamic.4.postprocess=
+-dynamic.4.rrd=
++dynamic.4.rrd=GAUGE
+
+-dynamic.5.name=load1,load5,load15
+-dynamic.5.source=/proc/loadavg
+-dynamic.5.regexp=^(\S+)\s(\S+)\s(\S+)
+-dynamic.5.postprocess=
++dynamic.5.name=sdcard_root_used
++dynamic.5.source=df /
++dynamic.5.regexp=^[^\s]+\s+\d+\s+(\d+)
++dynamic.5.postprocess=$1/1024
+ dynamic.5.rrd=GAUGE
+
+-dynamic.6.name=sdcard_root_used
+-dynamic.6.source=df -t ext4
+-dynamic.6.regexp=root\s+\d+\s+(\d+)
++dynamic.6.name=sdcard_boot_used
++dynamic.6.source=df /boot
++dynamic.6.regexp=^[^\s]+\s+\d+\s+(\d+)
+ dynamic.6.postprocess=$1/1024
+ dynamic.6.rrd=GAUGE
+
+-dynamic.7.name=sdcard_boot_used
+-dynamic.7.source=df -t vfat
+-dynamic.7.regexp=mmcblk0p1\s+\d+\s+(\d+)
+-dynamic.7.postprocess=$1/1024
+-dynamic.7.rrd=GAUGE
+-
+-dynamic.8.name=swap_used
+-dynamic.8.source=/proc/meminfo
+-dynamic.8.regexp=SwapFree:\s+(\d+)
+-dynamic.8.postprocess=$this->{'static'}->{'swap_total'} - ($1/1024)
++dynamic.8.name=tmpfs_ram_used
++dynamic.8.source=df /mnt/ram
++dynamic.8.regexp=^[^\s]+\s+\d+\s+(\d+)
++dynamic.8.postprocess=$1/1024
+ dynamic.8.rrd=GAUGE
+
+-dynamic.9.name=memory_free
++dynamic.9.name=swap_total
+ dynamic.9.source=/proc/meminfo
+-dynamic.9.regexp=MemFree:\s+(\d+)
++dynamic.9.regexp=SwapTotal:\s+(\d+)
+ dynamic.9.postprocess=$1/1024
+ dynamic.9.rrd=GAUGE
+
+-dynamic.10.name=net_received
+-dynamic.10.source=/sys/class/net/eth0/statistics/rx_bytes
+-dynamic.10.regexp=(.*)
+-dynamic.10.postprocess=$1*-1
+-dynamic.10.rrd=DERIVE
+-
+-dynamic.11.name=net_send
+-dynamic.11.source=/sys/class/net/eth0/statistics/tx_bytes
+-dynamic.11.regexp=(.*)
++dynamic.10.name=swap_used
++dynamic.10.source=/proc/meminfo
++dynamic.10.regexp=SwapFree:\s+(\d+)
++dynamic.10.postprocess=$this->{'dynamic'}->{'swap_total'} - ($1/1024)
++dynamic.10.rrd=GAUGE
++
++dynamic.11.name=memory_total
++dynamic.11.source=/opt/vc/bin/vcgencmd get_mem arm
++dynamic.11.regexp=^.*=(\d+)M$
+ dynamic.11.postprocess=
+-dynamic.11.rrd=DERIVE
++dynamic.11.rrd=GAUGE
+
+-dynamic.12.name=soc_temp
+-dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp
+-dynamic.12.regexp=(.*)
+-dynamic.12.postprocess=$1/1000
++dynamic.12.name=memory_gpu
++dynamic.12.source=/opt/vc/bin/vcgencmd get_mem gpu
++dynamic.12.regexp=^.*=(\d+)M$
++dynamic.12.postprocess=
+ dynamic.12.rrd=GAUGE
+
+-dynamic.13.name=uptime
+-dynamic.13.source=/proc/uptime
+-dynamic.13.regexp=(^\S+)
+-dynamic.13.postprocess=
++dynamic.13.name=memory_free
++dynamic.13.source=/proc/meminfo
++dynamic.13.regexp=MemFree:\s+(\d+)
++dynamic.13.postprocess=$1/1024
+ dynamic.13.rrd=GAUGE
+
+-dynamic.14.name=scaling_governor
+-dynamic.14.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+-dynamic.14.regexp=(.*)
+-dynamic.14.postprocess=
+-dynamic.14.rrd=
++dynamic.14.name=memory_used
++dynamic.14.source=/proc/meminfo
++dynamic.14.regexp=MemFree:\s+(\d+)
++dynamic.14.postprocess=$this->{'dynamic'}->{'memory_total'} - ($1/1024)
++dynamic.14.rrd=GAUGE
++
++dynamic.15.name=net_received
++dynamic.15.source=/sys/class/net/eth0/statistics/rx_bytes
++dynamic.15.regexp=(.*)
++dynamic.15.postprocess=$1*-1
++dynamic.15.rrd=DERIVE
++
++dynamic.16.name=net_send
++dynamic.16.source=/sys/class/net/eth0/statistics/tx_bytes
++dynamic.16.regexp=(.*)
++dynamic.16.postprocess=
++dynamic.16.rrd=DERIVE
++
++dynamic.17.name=soc_temp
++dynamic.17.source=/sys/devices/virtual/thermal/thermal_zone0/temp
++dynamic.17.regexp=(.*)
++dynamic.17.postprocess=int($1/10)/100
++dynamic.17.rrd=GAUGE
++
++dynamic.18.name=uptime
++dynamic.18.source=/proc/uptime
++dynamic.18.regexp=(^\S+)
++dynamic.18.postprocess=
++dynamic.18.rrd=GAUGE
+
+ ########################################################################
+ # Web interface configuration
+@@ -309,13 +358,16 @@
+
+ #######################################################################
+ web.status.1.name=Raspberry Pi
++
+ web.status.1.content.1.name=Version
+ web.status.1.content.1.icon=version.png
+ web.status.1.content.1.line.1='Processor: <b>' + data.processor + '</b>'
+-web.status.1.content.1.line.2='Distribution: <b>'+ data.distribution + '</b>'
+-web.status.1.content.1.line.3='Kernel version: <b>' + data.kernel_version + '</b>'
+-web.status.1.content.1.line.4='Firmware: <b>' + data.firmware + '</b>'
+-web.status.1.content.1.line.5='Package(s) to be: <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package update',data.packages)
++web.status.1.content.1.line.2='Hardware: <b>' + data.hardware + '</b> revision <b>' + data.revision + '</b>'
++web.status.1.content.1.line.3='Serial number: <b>' + data.serial + '</b>'
++web.status.1.content.1.line.4='Distribution: <b>'+ data.distribution + '</b>'
++web.status.1.content.1.line.5='Kernel version: <b>' + data.kernel_version + '</b>'
++web.status.1.content.1.line.6='Firmware: <b>' + data.firmware + '</b>'
++#web.status.1.content.1.line.7='Package(s) to be: <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package update',data.packages)
+
+ web.status.1.content.2.name=Uptime
+ web.status.1.content.2.icon=uptime.png
+@@ -334,8 +386,9 @@
+
+ web.status.1.content.5.name=Memory
+ web.status.1.content.5.icon=memory.png
+-web.status.1.content.5.line.1="Used: <b>" + KMG(data.memory_total-data.memory_free,'M') + "</b> (<b>" + Percent(data.memory_total-data.memory_free,data.memory_total,'M') + "</b>) Free: <b>" + KMG(data.memory_free,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>"
+-web.status.1.content.5.line.2=ProgressBar(data.memory_total-data.memory_free,data.memory_total)
++web.status.1.content.5.line.1="Used: <b>" + KMG(data.memory_used,'M') + "</b> (<b>" + Percent(data.memory_used,data.memory_total,'M') + "</b>) Free: <b>" + KMG(data.memory_free,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>"
++web.status.1.content.5.line.2="GPU: <b>" + KMG(data.memory_gpu,'M') + "</b>"
++web.status.1.content.5.line.3=ProgressBar(data.memory_used,data.memory_total)
+
+ web.status.1.content.6.name=Swap
+ web.status.1.content.6.icon=swap.png
+@@ -349,66 +402,94 @@
+ web.status.1.content.7.line.3="<b>/</b> Used: <b>"+KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_root_total-data.sdcard_root_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_root_total,'M') + "</b>"
+ web.status.1.content.7.line.4=ProgressBar(data.sdcard_root_used,data.sdcard_root_total)
+
+-web.status.1.content.8.name=Network
+-web.status.1.content.8.icon=network.png
+-web.status.1.content.8.line.1="Ethernet Sent: <b>"+KMG(data.net_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.net_received)) + "<i class='icon-arrow-down'></i></b>"
++web.status.1.content.8.name=RAM fs
++web.status.1.content.8.icon=memory.png
++web.status.1.content.8.line.1="Used: <b>"+KMG(data.tmpfs_ram_used,'M')+"</b> (<b>"+Percent(data.tmpfs_ram_used,data.tmpfs_ram_total,'M')+"</b>) Free: <b>"+KMG(data.tmpfs_ram_total-data.tmpfs_ram_used,'M')+ "</b> Total: <b>"+ KMG(data.tmpfs_ram_total,'M') + "</b>"
++web.status.1.content.8.line.2=ProgressBar(data.tmpfs_ram_used,data.tmpfs_ram_total)
++
++web.status.1.content.9.name=Network
++web.status.1.content.9.icon=network.png
++web.status.1.content.9.line.1="Ethernet Sent: <b>"+KMG(data.net_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.net_received)) + "<i class='icon-arrow-down'></i></b>"
+
+ #######################################################################
+ web.statistics.1.name=Raspberry Pi
+-web.statistics.1.content.1.name=CPU Loads
+-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.ds_graph_options.load1.label=Load 1min
+-web.statistics.1.content.1.ds_graph_options.load5.label=Load 5min
+-web.statistics.1.content.1.ds_graph_options.load15.label=Load 15min
+-
+-web.statistics.1.content.2.name=Network
+-web.statistics.1.content.2.graph.1=net_send
+-web.statistics.1.content.2.graph.2=net_received
+-web.statistics.1.content.2.ds_graph_options.net_send.label=Upload bandwidth (bits)
+-web.statistics.1.content.2.ds_graph_options.net_send.lines={ fill: true }
+-web.statistics.1.content.2.ds_graph_options.net_send.color="#FF7777"
+-web.statistics.1.content.2.ds_graph_options.net_received.label=Download bandwidth (bits)
+-web.statistics.1.content.2.ds_graph_options.net_received.lines={ fill: true }
+-web.statistics.1.content.2.ds_graph_options.net_received.color="#77FF77"
+-
+-web.statistics.1.content.3.name=Disks - boot
+-web.statistics.1.content.3.graph.1=sdcard_boot_total
+-web.statistics.1.content.3.graph.2=sdcard_boot_used
+-web.statistics.1.content.3.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB)
+-web.statistics.1.content.3.ds_graph_options.sdcard_boot_total.color="#FF7777"
+-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB)
+-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.lines={ fill: true }
+-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.color="#7777FF"
+-
+-web.statistics.1.content.4.name=Disks - root
+-web.statistics.1.content.4.graph.1=sdcard_root_total
+-web.statistics.1.content.4.graph.2=sdcard_root_used
+-web.statistics.1.content.4.ds_graph_options.sdcard_root_total.label=Size of / (MB)
+-web.statistics.1.content.4.ds_graph_options.sdcard_root_total.color="#FF7777"
+-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.label=Used on / (MB)
+-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.lines={ fill: true }
+-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.color="#7777FF"
+-
+-web.statistics.1.content.5.name=Swap
+-web.statistics.1.content.5.graph.1=swap_total
+-web.statistics.1.content.5.graph.2=swap_used
+-web.statistics.1.content.5.ds_graph_options.swap_total.label=Swap size (MB)
+-web.statistics.1.content.5.ds_graph_options.swap_total.color="#FF7777"
+-web.statistics.1.content.5.ds_graph_options.swap_used.label=Swap used (MB)
+-web.statistics.1.content.5.ds_graph_options.swap_used.lines={ fill: true }
+-web.statistics.1.content.5.ds_graph_options.swap_used.color="#7777FF"
+-
+-web.statistics.1.content.6.name=Memory
+-web.statistics.1.content.6.graph.1=memory_free
+-web.statistics.1.content.6.ds_graph_options.memory_free.label=Free Memory (MB)
+-
+-web.statistics.1.content.7.name=Uptime
+-web.statistics.1.content.7.graph.1=uptime
+-web.statistics.1.content.7.ds_graph_options.uptime.label=Uptime (s)
+-
+-web.statistics.1.content.8.name=Temperature
+-web.statistics.1.content.8.graph.1=soc_temp
+-web.statistics.1.content.8.ds_graph_options.soc_temp.label=Core temperature (deg C)
++
++web.statistics.1.content.1.name=CPU Speed
++web.statistics.1.content.1.graph.1=cpu_frequency
++web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=Frequency (MHz)
++web.statistics.1.content.1.ds_graph_options.cpu_frequency.color="#FF7777"
++
++web.statistics.1.content.2.name=CPU Loads
++web.statistics.1.content.2.graph.1=load1
++web.statistics.1.content.2.graph.2=load5
++web.statistics.1.content.2.graph.3=load15
++web.statistics.1.content.2.ds_graph_options.load1.label=Load 1min
++web.statistics.1.content.2.ds_graph_options.load5.label=Load 5min
++web.statistics.1.content.2.ds_graph_options.load15.label=Load 15min
++
++web.statistics.1.content.3.name=Network
++web.statistics.1.content.3.graph.1=net_send
++web.statistics.1.content.3.graph.2=net_received
++web.statistics.1.content.3.ds_graph_options.net_send.label=Upload bandwidth (bits)
++web.statistics.1.content.3.ds_graph_options.net_send.lines={ fill: true }
++web.statistics.1.content.3.ds_graph_options.net_send.color="#FF7777"
++web.statistics.1.content.3.ds_graph_options.net_received.label=Download bandwidth (bits)
++web.statistics.1.content.3.ds_graph_options.net_received.lines={ fill: true }
++web.statistics.1.content.3.ds_graph_options.net_received.color="#77FF77"
++
++web.statistics.1.content.4.name=Disks - boot
++web.statistics.1.content.4.graph.1=sdcard_boot_total
++web.statistics.1.content.4.graph.2=sdcard_boot_used
++web.statistics.1.content.4.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB)
++web.statistics.1.content.4.ds_graph_options.sdcard_boot_total.color="#FF7777"
++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB)
++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.lines={ fill: true }
++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.color="#7777FF"
++
++web.statistics.1.content.5.name=Disks - root
++web.statistics.1.content.5.graph.1=sdcard_root_total
++web.statistics.1.content.5.graph.2=sdcard_root_used
++web.statistics.1.content.5.ds_graph_options.sdcard_root_total.label=Size of / (MB)
++web.statistics.1.content.5.ds_graph_options.sdcard_root_total.color="#FF7777"
++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.label=Used on / (MB)
++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.lines={ fill: true }
++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.color="#7777FF"
++
++web.statistics.1.content.7.name=Swap
++web.statistics.1.content.7.graph.1=swap_total
++web.statistics.1.content.7.graph.2=swap_used
++web.statistics.1.content.7.ds_graph_options.swap_total.label=Swap size (MB)
++web.statistics.1.content.7.ds_graph_options.swap_total.color="#FF7777"
++web.statistics.1.content.7.ds_graph_options.swap_used.label=Swap used (MB)
++web.statistics.1.content.7.ds_graph_options.swap_used.lines={ fill: true }
++web.statistics.1.content.7.ds_graph_options.swap_used.color="#7777FF"
++
++web.statistics.1.content.8.name=Memory
++web.statistics.1.content.8.graph.1=memory_free
++web.statistics.1.content.8.graph.2=memory_used
++web.statistics.1.content.8.graph.3=memory_total
++web.statistics.1.content.8.graph.4=memory_gpu
++web.statistics.1.content.8.graph.5=tmpfs_ram_total
++web.statistics.1.content.8.graph.6=tmpfs_ram_used
++web.statistics.1.content.8.ds_graph_options.memory_free.label=Free Memory (MB)
++web.statistics.1.content.8.ds_graph_options.memory_free.color="#77FF77"
++web.statistics.1.content.8.ds_graph_options.memory_used.label=Used Memory (MB)
++web.statistics.1.content.8.ds_graph_options.memory_used.color="#FF7777"
++web.statistics.1.content.8.ds_graph_options.memory_total.label=Total Memory (MB)
++web.statistics.1.content.8.ds_graph_options.memory_total.color="#7777FF"
++web.statistics.1.content.8.ds_graph_options.memory_gpu.label=GPU Memory (MB)
++web.statistics.1.content.8.ds_graph_options.memory_gpu.lines={ fill: true }
++web.statistics.1.content.8.ds_graph_options.memory_gpu.color="#FFFF77"
++web.statistics.1.content.8.ds_graph_options.tmpfs_ram_total.label=Size of /mnt/ram (MB)
++web.statistics.1.content.8.ds_graph_options.tmpfs_ram_total.color="#FF77FF"
++web.statistics.1.content.8.ds_graph_options.tmpfs_ram_used.label=Used on /mnt/ram (MB)
++web.statistics.1.content.8.ds_graph_options.tmpfs_ram_used.color="#77FFFF"
++
++web.statistics.1.content.9.name=Uptime
++web.statistics.1.content.9.graph.1=uptime
++web.statistics.1.content.9.ds_graph_options.uptime.label=Uptime (s)
++
++web.statistics.1.content.10.name=Temperature
++web.statistics.1.content.10.graph.1=soc_temp
++web.statistics.1.content.10.ds_graph_options.soc_temp.label=Core temperature (deg C)
+
diff --git a/www-apps/rpi-monitor/rpi-monitor-2.2.ebuild b/www-apps/rpi-monitor/rpi-monitor-2.2.ebuild
index b26a0dc7..93cc5276 100644
--- a/www-apps/rpi-monitor/rpi-monitor-2.2.ebuild
+++ b/www-apps/rpi-monitor/rpi-monitor-2.2.ebuild
@@ -36,7 +36,7 @@ fi
S="${WORKDIR}/RPi-Monitor-${PV}"
src_prepare() {
- epatch "${FILESDIR}"/default.conf.patch \
+ epatch "${FILESDIR}"/default.conf-"${PV}".patch \
|| die "epatch failed"
cp "${S}"/../RPi-Monitor-deb-"${PV}"/conf2man.pl .
@@ -111,5 +111,11 @@ src_install() {
}
pkg_postinst() {
- einfo "Edit the file /etc/rpimonitord.conf to configure RPI Monitor"
+ einfo "Edit the file /etc/rpimonitord.conf.d/default.conf to configure RPi-Monitor"
+ echo
+ ewarn "If graphs display incorrect data or values are shown as 'NaN' in the"
+ ewarn "web-interface, especially after configuration changes, try stopping"
+ ewarn "RPi-Monitor and deleting the affected .rrd files from"
+ ewarn "/var/lib/rpi-monitor before restarting RPi-Monitor - which should clear"
+ ewarn "any problems caused by changes in format."
}
diff --git a/www-apps/rpi-monitor/rpi-monitor-2.3.ebuild b/www-apps/rpi-monitor/rpi-monitor-2.3.ebuild
new file mode 100644
index 00000000..93cc5276
--- /dev/null
+++ b/www-apps/rpi-monitor/rpi-monitor-2.3.ebuild
@@ -0,0 +1,121 @@
+# Copyright (c) 2013 Stuart Shelton <stuart@shelton.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="RPi-Monitor - always keep an eye on your Raspberry Pi"
+HOMEPAGE="http://rpi-experiences.blogspot.fr"
+SRC_URI="https://github.com/XavierBerger/RPi-Monitor/archive/v${PV}.zip -> ${P}.zip
+ https://github.com/XavierBerger/RPi-Monitor-deb/archive/v${PV}.zip -> ${PN}-deb-${PV}.zip"
+RESTRICT="nomirror"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="-* arm"
+IUSE="httpd tools"
+
+DEPEND="app-admin/webapp-config"
+RDEPEND="
+ httpd? (
+ virtual/httpd-cgi
+ )
+ !httpd? (
+ dev-perl/HTTP-Daemon
+ )
+ net-analyzer/rrdtool[perl]
+ || ( ( virtual/perl-JSON-PP dev-perl/JSON-Any ) dev-perl/JSON )"
+
+if use httpd; then
+ inherit webapp
+
+ need_httpd_cgi
+fi
+
+S="${WORKDIR}/RPi-Monitor-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/default.conf-"${PV}".patch \
+ || die "epatch failed"
+
+ cp "${S}"/../RPi-Monitor-deb-"${PV}"/conf2man.pl .
+ cp "${S}"/../RPi-Monitor-deb-"${PV}"/help2man.pl .
+ chmod 755 conf2man.pl help2man.pl
+
+ [[ -x ./help2man.pl && -x conf2man.pl ]] \
+ || die "Portage temporary directory must not be mounted 'noexec'"
+
+ cat rpimonitor/rpimonitord.conf rpimonitor/default.conf > rpimonitord.conf
+
+ ./help2man.pl rpimonitor/rpimonitord "${PV}" > rpimonitord.1
+ ./conf2man.pl rpimonitord.conf "${PV}" > rpimonitord.conf.5
+}
+
+src_install() {
+ use httpd && webapp_src_preinst
+
+ doman rpimonitord.1 rpimonitord.conf.5
+
+ dodoc README.md
+ newdoc tools/reverseproxy nginx.conf.example
+ newdoc rpimonitor/custo.conf custom.conf
+ dodoc rpimonitor/default.conf
+
+ dosbin rpimonitor/rpimonitord
+ if use tools; then
+ exeinto /usr/share/"${PN}"/tools
+ doexe tools/{addnginxuser.sh,make_ca.sh,make_cert.sh,netTraffic.sh,openssl.cnf}
+ fi
+
+ newconfd "${FILESDIR}"/rpimonitor.confd rpimonitor
+ newinitd "${FILESDIR}"/rpimonitor.initd rpimonitor
+ dodir /etc/rpimonitord.conf.d
+ insinto /etc/rpimonitord.conf.d
+ doins rpimonitor/default.conf
+
+ if use httpd; then
+ INSTROOT="${EROOT}/var/www/localhost/htdocs"
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r rpimonitor/web/*
+ dodir "${MY_HTDOCSDIR}"/custom/net_traffic
+ dodir "${MY_HTDOCSDIR}"/stat
+
+ webapp_serverowned "${MY_HTDOCSDIR}"/custom
+ webapp_serverowned "${MY_HTDOCSDIR}"/custom/net_traffic
+ webapp_serverowned "${MY_HTDOCSDIR}"/stat
+ else
+ INSTROOT="${EROOT}/usr/share"
+
+ insinto /usr/share/rpi-monitor
+ doins -r rpimonitor/web/*
+ diropts -m 0775 -o nobody -g nogroup
+
+ dodir /var/lib/rpi-monitor/custom/net_traffic
+ dodir /var/lib/rpi-monitor/stat
+
+ dosym ../../../var/lib/rpi-monitor/stat /usr/share/rpi-monitor/stat
+ dosym ../../../var/lib/rpi-monitor/custom /usr/share/rpi-monitor/custom
+ fi
+
+ sed -i \
+ -e "s|^#daemon.webroot=./web$|daemon.webroot=${INSTROOT/\/\///}/rpi-monitor|" \
+ -e "s|^#daemon.user=pi$|daemon.user=nobody|" \
+ -e "s|^#daemon.group=pi$|daemon.group=nogroup|" \
+ rpimonitor/rpimonitord.conf
+ insinto /etc/
+ doins rpimonitor/rpimonitord.conf
+
+ use httpd && webapp_src_install
+}
+
+pkg_postinst() {
+ einfo "Edit the file /etc/rpimonitord.conf.d/default.conf to configure RPi-Monitor"
+ echo
+ ewarn "If graphs display incorrect data or values are shown as 'NaN' in the"
+ ewarn "web-interface, especially after configuration changes, try stopping"
+ ewarn "RPi-Monitor and deleting the affected .rrd files from"
+ ewarn "/var/lib/rpi-monitor before restarting RPi-Monitor - which should clear"
+ ewarn "any problems caused by changes in format."
+}