diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/README | 13 | ||||
| -rwxr-xr-x[-rw-r--r--] | scripts/temperatures.g2v | 0 | ||||
| -rw-r--r-- | scripts/vdrstats.default | 17 |
3 files changed, 24 insertions, 6 deletions
diff --git a/scripts/README b/scripts/README index 5f22c35..a107b5c 100644 --- a/scripts/README +++ b/scripts/README @@ -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. diff --git a/scripts/temperatures.g2v b/scripts/temperatures.g2v index 79d0774..79d0774 100644..100755 --- a/scripts/temperatures.g2v +++ b/scripts/temperatures.g2v diff --git a/scripts/vdrstats.default b/scripts/vdrstats.default new file mode 100644 index 0000000..2d67ee0 --- /dev/null +++ b/scripts/vdrstats.default @@ -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 |
