Forum
rpimonitor - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Others (/forum-24.html)
+--- Thread: rpimonitor (/thread-2804.html)



rpimonitor - Fabio72 - 3rd Mar, 2015 01:51 AM

I played a bit with rpimonitor
https://github.com/XavierBerger/RPi-Monitor
I made some further customisation for Xbian



file /etc/rpimonitor/template/version.conf
Code:
...
static.5.name=xbmc
static.5.source=grep Kodi /home/xbian/.kodi/temp/kodi.log |head -1|awk '{ print substr($6,2) " " substr($7,0,length($7)-1) }'
static.5.regexp=(.*)
static.5.postprocess=
...
static.3.name=firmware
#static.3.source=/proc/version
static.3.source=/opt/vc/bin/vcgencmd version |sed -n '1~2'p|paste -s|awk '{ print $6 " ("  $2 " " $1 " " $3  " " $4 ")"}'
static.3.regexp=(.*)
static.3.postprocess=
...
web.status.1.content.1.name=Version
web.status.1.content.1.icon=xbian_logo.png
web.status.1.content.1.line.1='Processor: <b>' + data.processor + '</b>'
web.status.1.content.1.line.3='Kodi: <b>'+ data.xbmc + '</b>'
web.status.1.content.1.line.2='Distribution: <b>'+ data.distribution + '</b>'
web.status.1.content.1.line.4='Kernel version: <b>' + data.kernel_version + '</b>'
web.status.1.content.1.line.5='Firmware: <b>' + data.firmware + '</b>'
web.status.1.content.1.line.6='Package(s): <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package(s) upgradable(s)',data.packages)



file /etc/rpimonitor/template/cpu.conf
Code:
...
dynamic.5.name=h264_frequency
dynamic.5.source=/opt/vc/bin/vcgencmd measure_clock h264|awk '{split($0,array,"=")} END { print array[2] }'
dynamic.5.regexp=(.*)
dynamic.5.postprocess=$1/1000000
dynamic.5.rrd=

dynamic.6.name=core_frequency
dynamic.6.source=/opt/vc/bin/vcgencmd measure_clock core|awk '{split($0,array,"=")} END { print array[2] }'
dynamic.6.regexp=(.*)
dynamic.6.postprocess=$1/1000000
dynamic.6.rrd=
...
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 frequency: <b>" + data.cpu_frequency + "MHz</b> Voltage: <b>" + data.cpu_voltage + "V</b>"
web.status.1.content.1.line.3="Core frequency: <b>" + data.core_frequency + "MHz</b>"
web.status.1.content.1.line.4="H264 frequency: <b>" + data.h264_frequency + "MHz</b>"
web.status.1.content.1.line.5="Scaling governor: <b>" + data.scaling_governor + "</b>"
...



file /etc/rpimonitor/template/network.conf
Code:
...
dynamic.18.name=RX_bandwidth
dynamic.18.source=ifstat -i eth0 -w  0.5 1 |sed -n 3p|awk '{ print $1 }'
dynamic.18.regexp=(.*)
dynamic.18.postprocess=$1*1000
dynamic.18.rrd=

dynamic.19.name=TX_bandwidth
dynamic.19.source=ifstat -i eth0 -w  0.5 1 |sed -n 3p|awk '{ print $2 }'
dynamic.19.regexp=(.*)
dynamic.19.postprocess=$1*1000
dynamic.19.rrd=
...
web.status.1.content.8.name=Network
web.status.1.content.8.icon=network.png
web.status.1.content.8.line.1="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.line.2="TX Bandwidth: <b>" +KMG(data.TX_bandwidth) + "/s<i class='icon-arrow-up'></i></b> RX Bandwidth: <b>" + KMG(data.RX_bandwidth) + "/s<i class='icon-arrow-down'></i></b>"
...

for this one you have to apt-get install ifstat


RE: rpimonitor - f1vefour - 3rd Mar, 2015 04:20 AM

Very nice, good work.


RE: rpimonitor - Jibbij - 7th Mar, 2015 08:17 AM

Very useful, thank you! I'll contact you in the future about integrating this with XBian.Two.