相机内存压力测试脚本
作者:互联网
#=================================================================
#Script of capturing CPU, procrank, memory and top information with time interval.
mkdir /data/PerfLogs
cd /data/PerfLogs
rm ./*.txt
echo “Start…”
a=1
while :
do
echo “kernel_leak”
MYDATE=date +%y-%m-%d_%H:%M:%S
echo $MYDATE
echo $a
echo $$
echo “time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a}” >> proc_meminfo.txt
cat /proc/meminfo >> proc_meminfo.txt
echo “time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a} pid=$KaTeX parse error: Expected 'EOF', got '#' at position 51: …> meminfo.txt #̲echo "meminfo o…time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a}” >> top.txt &
#top -t -m 8 -n 1 >> top.txt &
echo “Perf1”
#let a=$a+1
#add by allenyao
#get the ION memory
#echo “time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a}” >> ion_memory.txt &
#cat /d/dma_buf/dmaprocs |grep -iE “provider|camera|oppoAlgoProcess|oppoalgo_daemon” >> ion_memory.txt &
#get the ION list
#echo “time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a}” >> ion_list.txt &
#cat /d/dma_buf/dmaprocs >> ion_list.txt &
#get the heap memory
#echo “time:
M
Y
D
A
T
E
n
u
m
:
{MYDATE} num:
MYDATEnum:{a}” >> heap_memory.txt &
ps -A | grep -iE “camera|oppoalgo_daemon” >> heap_memory.txt
let a=$a+1
sleep 15 #seconds, you can modify the time interval.
done
#=================================================================
标签:MYDATEnum,memory,MYDATE,echo,相机,内存,测试,time,txt 来源: https://blog.csdn.net/zhoumin090508/article/details/121013542