add function: monitorDiskWriteSpeed

This commit is contained in:
Tangchao
2023-07-13 14:34:54 +08:00
parent 81ec5ca6d7
commit 7fa1a0c34a

View File

@ -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