From af359b71b000651812e1ee70638b480502eba0ec Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 5 Apr 2018 22:05:05 +0200 Subject: media-server on odin --- custom/uucp-mediaserver/scripts/update-queuesize | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 custom/uucp-mediaserver/scripts/update-queuesize (limited to 'custom/uucp-mediaserver/scripts/update-queuesize') diff --git a/custom/uucp-mediaserver/scripts/update-queuesize b/custom/uucp-mediaserver/scripts/update-queuesize new file mode 100755 index 00000000..db1b3e2a --- /dev/null +++ b/custom/uucp-mediaserver/scripts/update-queuesize @@ -0,0 +1,10 @@ +#!@zsh@/bin/zsh + +base=$(basename $0) +suffix=${base##*.} + +uustat -s $suffix | grep 'Executing recv-media' | sed -r 's/^([^ ]+) .*\(sending ([0-9]+) bytes\)/\2 \1/' >> @queueDir@/${suffix}.queuesize +tmpFile=$(mktemp --tmpdir=$HOME) +sort -k 2 @queueDir@/${suffix}.queuesize | uniq -f 1 > "${tmpFile}" +cat "${tmpFile}" >! @queueDir@/${suffix}.queuesize +rm "${tmpFile}" -- cgit v1.2.3