系统内存和进程内存使用量监控 Yangyou 2019-10-12 Linux/Ubuntu 1234567while truedo echo `date '+%Y-%m-%d-%H:%M:%S'` `free | awk 'NR==2{print $3, $4 }'` >> mem_usage.log ps aux | grep -v grep | grep $1 | awk '{print $3, $4}' >> $1_status.log sleep 1done 12345678910while truedo START=$(date +%s) res=$(curl $1:8080/detect_netflix) END=$(date +%s) DIFF=$(( $END - $START )) echo `date '+%Y-%m-%d-%H:%M:%S'` $DIFF $res >> detect_res.log sleep 1done