介绍:Memtester
是一个检测VPS
真实可分配内存的小工具,适用于检测VPS
超售情况。本程序检测的可分配内存指的是用户使用时最大能占用的内存量。
使用
CentOS / RHEL
运行命令:
yum install wget -y
yum groupinstall "Development Tools" -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc++ memtester.cpp
./a.out
Ubuntu / Debian
运行命令:
apt-get update
apt-get install wget build-essential -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc++ memtester.cpp
./a.out
在进程被杀死前可以测出当时最大的内存占用
[root@aASPjF1018309 ~]# ./a.out
I will try my best to fill your RAM.
You have 3 seconds to quit (Ctrl+C)
10MB allocated
20MB allocated
30MB allocated
40MB allocated
50MB allocated
60MB allocated
70MB allocated
80MB allocated
90MB allocated
100MB allocated
110MB allocated
120MB allocated
130MB allocated
140MB allocated
150MB allocated
160MB allocated
170MB allocated
180MB allocated
190MB allocated
200MB allocated
210MB allocated
220MB allocated
230MB allocated
240MB allocated
250MB allocated
260MB allocated
270MB allocated
280MB allocated
290MB allocated
300MB allocated
310MB allocated
320MB allocated
330MB allocated
340MB allocated
350MB allocated
360MB allocated
370MB allocated
380MB allocated
390MB allocated
400MB allocated
410MB allocated
420MB allocated
430MB allocated
440MB allocated
450MB allocated
460MB allocated
470MB allocated
480MB allocated
490MB allocated
500MB allocated
510MB allocated
520MB allocated
530MB allocated
540MB allocated
550MB allocated
560MB allocated
570MB allocated
580MB allocated
590MB allocated
600MB allocated
610MB allocated
620MB allocated
630MB allocated
640MB allocated
650MB allocated
660MB allocated
670MB allocated
680MB allocated
690MB allocated
700MB allocated
710MB allocated
720MB allocated
730MB allocated
740MB allocated
750MB allocated
760MB allocated
770MB allocated
780MB allocated
790MB allocated
800MB allocated
810MB allocated
820MB allocated
830MB allocated
840MB allocated
850MB allocated
860MB allocated
870MB allocated
880MB allocated
890MB allocated
900MB allocated
910MB allocated
920MB allocated
930MB allocated
940MB allocated
950MB allocated
960MB allocated
970MB allocated
980MB allocated
990MB allocated
1000MB allocated
1010MB allocated
1020MB allocated
1030MB allocated
1040MB allocated
1050MB allocated
1060MB allocated
1070MB allocated
1080MB allocated
1090MB allocated
1100MB allocated
1110MB allocated
1120MB allocated
1130MB allocated
1140MB allocated
1150MB allocated
1160MB allocated
1170MB allocated
1180MB allocated
1190MB allocated
1200MB allocated
1210MB allocated
1220MB allocated
1230MB allocated
1240MB allocated
1250MB allocated
1260MB allocated
1270MB allocated
1280MB allocated
1290MB allocated
1300MB allocated
1310MB allocated
1320MB allocated
1330MB allocated
1340MB allocated
已杀死
[root@aASPjF1018309 ~]#
文章: 《Memtester一键脚本,可检测VPS真实可分配内存及超售情况》
联系方式:
文章链接:https://wxiou.cn/index.php/archives/85/
除特别注明外,文章均为Literature原创,转载时请注明本文出处及文章链接
联系方式:
文章链接:https://wxiou.cn/index.php/archives/85/
除特别注明外,文章均为Literature原创,转载时请注明本文出处及文章链接