标签:ash sleep docke pop dsp tor monitor docker mes
#!/bin/bash
startT=`date +%Y-%m-%dT%H:%M:%S`
echo "TIMESTAMP CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS\n">>mem.$startT.txt
jmeterContainerID=$(docker ps | grep "adspop" | awk ‘{print $1}‘)
while true
do
timestamp=`date +%Y-%m-%dT%H:%M:%S`
dockerinfo=`docker stats --no-stream $jmeterContainerID | grep -v CONTAINER`
echo "$timestamp $dockerinfo" >>mem.$startT.txt
sleep 60
done
标签:ash sleep docke pop dsp tor monitor docker mes
原文地址:https://www.cnblogs.com/buptqq/p/13042816.html