diff --git a/monitorMemory_while.sh b/monitorMemory_while.sh index aa2cff5..bd0ceb1 100755 --- a/monitorMemory_while.sh +++ b/monitorMemory_while.sh @@ -2,6 +2,7 @@ while true do Mem=$(free -m | grep Mem | awk {'print $3'}) + disk=$(iotop -o -b -k -d 1 -n 1 | grep Total | awk {'print $10'}) if [ $Mem -ge 3000 ]; then /home/300tc/projects/udpClient/udpClient 127.0.0.1 9,0 @@ -9,7 +10,7 @@ do time=$(date +%Y%m%d_%H%M%S) - txt=$time"\t"$Mem + txt=$time"\t"$Mem"\t"$disk echo -e $txt &>> /media/nvme/300TC/programRunLog/memoryUseage.txt sleep 2