From 7fa1a0c34ac2e8d9f04af03c0a23f0fee38e4013 Mon Sep 17 00:00:00 2001 From: Tangchao <735056338@qq.com> Date: Thu, 13 Jul 2023 14:34:54 +0800 Subject: [PATCH] add function: monitorDiskWriteSpeed --- monitorMemory_while.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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