mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
18 lines
561 B
Bash
18 lines
561 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
|
|
|
|
# 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
|