写一个shell来不停的消耗系统内存,来进行测试。
#!/bin/bash
mkdir /tmp/memory
mount -t tmpfs -o size=1024M tmpfs /tmp/memory
sleep 3600
rm /tmp/memory/block
umount /tmp/memory
rmdir /tmp/memory
执行结果
写一个shell来不停的消耗系统内存,来进行测试。
#!/bin/bash
mkdir /tmp/memory
mount -t tmpfs -o size=1024M tmpfs /tmp/memory
sleep 3600
rm /tmp/memory/block
umount /tmp/memory
rmdir /tmp/memory
相关文章: