mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
improved vdrstats.default script
This commit is contained in:
parent
b528d69dd4
commit
8d4a1b12b3
@ -7,11 +7,8 @@ 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
|
||||
read vdr_cpu vdr_mem < <(ps -C vdr -o %cpu=,%mem= | sort | tail -n1)
|
||||
echo $vdr_cpu > ${OUTPUTFLDR}/vdrcpu
|
||||
echo $vdr_mem > ${OUTPUTFLDR}/vdrmem
|
||||
|
Loading…
Reference in New Issue
Block a user