added viewelement <vdrstatistics> in main menu

This commit is contained in:
louis
2015-05-14 16:55:56 +02:00
parent af59c465aa
commit 5a0155d1e9
12 changed files with 140 additions and 18 deletions

View File

@@ -1,10 +1,11 @@
This Widget provide information about the system temperatures.
Scripts for:
- system temperatures - "temperatures" is called
- vdr statistics (vdr cpu load and memory usage) "vdrstats" is called
You must manually create a link to the corresponding script, for example:
You must manually create a link for each script to the script you want to use, for example:
ln -s temperatures.default temperatures
ln -s vdrstats.default vdrstats
The command "temperatures" will be executed every time the widget is drawn, so please keep it short and fast.
The command can provide three temperatures: cpu, pc case and gpu temperature
The command can also be called from system information widget. So the output files must also begin with 01_ - 99_ for sort/position.
The scripts will be executed every time the according viewelement is displayed, so please keep it short and fast.
Please install lm-sensors and configure it for your system. See the default script for an example.
Please install lm-sensors and configure it for your system.

0
scripts/temperatures.g2v Normal file → Executable file
View File

17
scripts/vdrstats.default Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# please update this script to fit your needs
# this script is call every time the according viewelement will be drawn, so keep it short and fast ;)
OUTPUTFLDR="/tmp/skindesigner/"
mkdir -p ${OUTPUTFLDR}
# there can be 2 files, vdrcpu and vdrmem
rm -f ${OUTPUTFLDR}/vdrcpu ${OUTPUTFLDR}/vdrmem
# vdr cpu usage, is 10th element in "top" list
top -n 1 | grep " vdr " | awk -F " " '{ print $10;}' > ${OUTPUTFLDR}/vdrcpu
# vdr memory usage, is 11th element in "top" list
top -n 1 | grep " vdr " | awk -F " " '{ print $11;}' > ${OUTPUTFLDR}/vdrmem