MinimServer Forum

Full Version: Playcount statistics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if it is possible to gather some statistics what files where played how often.
my first idea was to do set log level to debug and with a shellscript that does
tail -f /usr/local/share/minimserver/data/minimserver.log | grep -A 1 -e 'Content-Type: audio' | sed -n -e 's/^.*from file //p'
to get a list of all played/served audio files.
however this does not work with tail -f on the fly.. any ideas how I could do this?

best regards
tail -f /minimserver/data/minimserver.log | grep --line-buffered -A 1 -E "(Content-Type: audio)" | stdbuf -o0 sed -n -e 's/^.*from file //p' | stdbuf -o0 uniq >> output.log

that worked for me in the end. I am writing a python script to submit this data to and maybe so I probably will redo all this stuff in python.
Reference URL's