From 5a0155d1e924601c7fa686001af19928887f83f7 Mon Sep 17 00:00:00 2001 From: louis Date: Thu, 14 May 2015 16:55:56 +0200 Subject: added viewelement in main menu --- scripts/README | 13 +++++++------ scripts/temperatures.g2v | 0 scripts/vdrstats.default | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/temperatures.g2v create mode 100644 scripts/vdrstats.default (limited to 'scripts') 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 old mode 100644 new mode 100755 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 -- cgit v1.2.3