Memtester一键脚本:检测VPS真实可分配内存及超售情况

Memtester是一个检测VPS真实可分配内存的小工具,适用于检测VPS超售情况。本程序检测的可分配内存指的是用户使用时最大能占用的内存量。

Github地址:https://github.com/FunctionClub/Memtester

运行命令:在进程被杀死前可以测出当时最大的内存占用,如果进程被杀死,脚本直接停止终止检测最大的内存占用。

#CentOS/RHEL系统
yum install wget -y
yum groupinstall "Development Tools" -y
wget -N --no-check-certificate 
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 -N --no-check-certificate 
https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc++ memtester.cpp
./a.out

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据