first commit, 去掉大文件后新建的git库,和老库的提交17ce6ae一样
This commit is contained in:
18
monitorMemory_while.sh
Normal file
18
monitorMemory_while.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
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
|
||||
fi
|
||||
|
||||
time=$(date +%Y%m%d_%H%M%S)
|
||||
|
||||
txt=$time"\t"$Mem"\t"$disk
|
||||
echo -e $txt &>> /media/nvme/300TC/programRunLog/memoryUseage.txt
|
||||
|
||||
sleep 2
|
||||
done
|
||||
|
Reference in New Issue
Block a user