1
0
mirror of https://github.com/coturn/coturn.git synced 2025-08-10 00:07:06 +02:00
coturn/examples/cpu-mem.sh
MÉSZÁROS Mihály e2717e0fae tidy
2018-11-05 14:15:36 +00:00

9 lines
246 B
Bash
Executable File

#!/bin/bash
while sleep 1; do
DATE="$(date)";
PS="$( ps -p `pidof turnserver` -o 'pcpu,pmem,rss,vsz')";
TOP="$( top -p `pidof turnserver` -n1 -b -H -c )"
OUTPUT=$DATE"\n\n"$TOP"\n\nps\n"$PS"\n";
echo -e "$OUTPUT" | tee -a cpu-mem.log;
done;