vdr-plugin-skindesigner/scripts/vdrstats.default
2016-04-30 18:01:27 +02:00

15 lines
454 B
Bash

#!/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
read vdr_cpu vdr_mem < <(ps -C vdr -o %cpu=,%mem= | sort | tail -n1)
echo $vdr_cpu > ${OUTPUTFLDR}/vdrcpu
echo $vdr_mem > ${OUTPUTFLDR}/vdrmem