title: Memtester One-Click Script, Detects VPS Real Allocatable Memory and Overselling Situation
tags: []
id: '1076'
categories:
-
- Tutorial
date: 2019-11-18 12:22:30
cover:
ai: true
- Tutorial
Introduction#
Memtester
is a small tool for detecting the real allocatable memory of a VPS, suitable for detecting overselling situations. The allocatable memory detected by this program refers to the maximum amount of memory that can be occupied by the user when in use.
Usage#
Github Link: https://github.com/FunctionClub/Memtester
Run the following command:
# CentOS/RHEL system
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 system
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
# Script Backup
https://www.moeyy.cn/usr/shell/memtester.cpp
The maximum memory usage at the time can be measured before the process is killed.