Memory monitor v1.1

If he reach x% threshold server will be kill/restart base on actions.
Gemini_Generated_Image_tb4ruutb4ruutb4r.png
🚀 Automatic Memory Management for Pterodactyl

Prevent Server Crashes • High Memory Protection • Automated Restarts

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

📊 What is this?

Tired of servers crashing when they run out of memory? This addon automatically monitors ALL your game servers and takes action when memory usage gets too high - BEFORE the system kills them!

Protects against:
• Memory leaks (gradual memory increase over time)
• High memory usage from player activity
• Inefficient plugins/mods consuming too much RAM
• Memory spikes that would normally crash your server

⚡ Key Features

✅ Global Memory Monitoring
• Monitors ALL running servers on your panel automatically
• Only checks servers that are currently running (ignores stopped/offline servers)
• Set custom memory threshold (1-100%)
• Real-time memory usage tracking from Wings nodes

✅ Automatic Actions
Restart Server - Restarts server when threshold reached
Kill Server (Force Stop) - Force stop stuck processes immediately (default)
• Configurable target check intervals (5-300 seconds)
• Actions only trigger when threshold is exceeded

✅ Smart Admin Panel
• Easy-to-use admin interface with live dashboard
• Real-time statistics (total servers, running servers, action counts)
• View 20 most recent actions with memory usage percentages
• Action history showing which servers triggered and when
• One-click enable/disable monitoring

✅ Detailed Logging System
• Logs every action taken (server name, memory used, threshold, action type)
• Track memory usage patterns over time
• View top memory offenders
• Historical data for troubleshooting
• Paginated log viewer with 50 entries per page
• Clear all logs functionality

✅ Database-Driven Configuration
• Dynamic scheduling - no manual cron modifications needed
• Configuration changes take effect on next scheduled run
• Persistent settings stored in database
• Cache-based interval enforcement for precise timing

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

🎯 How It Works

1. Set your memory threshold (e.g., 90%) - default is 90%
2. Choose action: Restart or Kill (force stop) - default is Kill
3. Set target check interval (5-300 seconds) - default is 10 seconds
4. Enable monitoring with one click
5. Laravel scheduler runs the monitoring command periodically (every 1-10 minutes depending on your interval)
6. Cache system enforces your exact interval between actual checks
7. The system checks all running servers via Wings API
8. When a server exceeds the threshold, the chosen action triggers
9. Action is logged with memory details and timestamp

Example: If set to 90% threshold with "Kill":
• Server reaches 2700MB/3000MB (90%) → Automatic force stop
• Server at 2500MB/3000MB (83%) → No action, continues monitoring

Important Note: Due to Laravel scheduler limitations, the command runs at fixed intervals (every 1/5/10 minutes based on your setting). The cache system then enforces your exact configured interval between actual memory checks.

Screenshot_From_2026-01-31_11-47-08.png


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

💡 Perfect For

• Minecraft servers with memory leaks (mod/plugin related)
• Modded game servers that gradually consume RAM
• High player count servers with memory spikes
• Preventing OOM (Out of Memory) kills by host system
• Hosting providers managing multiple game servers
• Servers that need automatic maintenance
• Anyone tired of manual restarts every few hours!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

📦 What's Included

Full source code (Laravel PHP)
Admin panel interface with statistics dashboard
Database migrations (config + logs tables)
Automatic Laravel scheduler integration
Complete logging system with action history
Real-time server status monitoring
Top offenders tracking (identify problematic servers)
Installation instructions
Free updates

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

⚙️ Requirements

• Pterodactyl Panel (Latest version recommended - v1.11+)
• PHP 8.1 or higher
• Laravel Scheduler enabled (via cron: * * * * * php artisan schedule:run)
• Wings nodes properly configured and communicating with panel
• Database (MySQL/MariaDB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

🔧 Installation

1. Upload files to your Pterodactyl installation directory
2. Run database migrations: php artisan migrate
3. Clear cache: php artisan config:clear
4. Navigate to Admin Panel → Memory Management
5. Configure threshold, action, and interval (starts disabled by default)
6. Enable monitoring
7. Done! Laravel scheduler handles everything automatically

Detailed installation guide included with purchase!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

🔍 Technical Details

How Monitoring Works:
• Laravel scheduler runs the monitoring command at fixed intervals (1/5/10 minutes)
• Cache system enforces your configured interval between actual checks
• System fetches real-time stats from Wings nodes via DaemonServerRepository API
• Calculates memory percentage: (used MB / allocated MB) × 100
• If percentage ≥ threshold → triggers configured action
• Logs action with server details, memory stats, and timestamp
• Skips offline/stopped servers automatically

Scheduler Behavior:
• Check interval 5-60 seconds: Scheduler runs every 1 minute, cache enforces exact interval
• Check interval 61-300 seconds: Scheduler runs every 5 minutes, cache enforces exact interval
• Check interval > 300 seconds: Scheduler runs every 10 minutes, cache enforces exact interval

Actions Explained:
Restart: Sends restart signal to Pterodactyl's power system
Kill: Immediately force stops the server process (default action)

Safety Features:
• Only monitors servers with valid memory limits (> 0 MB)
• Handles unreachable Wings nodes gracefully (no crashes)
• Cache system prevents duplicate checks within interval
• Comprehensive error logging for debugging
• withoutOverlapping prevents concurrent runs

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

❓ FAQ

Q: Will this work with my existing setup?
A: Yes! It integrates seamlessly with Pterodactyl's existing infrastructure using official repositories.

Q: Can I set different thresholds per server?
A: Currently it's a global threshold for ALL servers. Per-server configuration is planned for future updates.

Q: What happens if a server is offline?
A: The system only monitors running servers and automatically skips stopped/offline ones.

Q: Does this slow down my panel?
A: No! It uses Pterodactyl's existing API and includes caching to minimize overhead.

Q: What's the difference between Restart and Kill?
A: Restart sends a restart command through Pterodactyl's power system. Kill forces immediate termination. Use Restart for normal cases, Kill for stuck processes.

Q: How often are servers checked?
A: You configure this! Set any interval from 5 to 300 seconds. Due to Laravel scheduler limitations, the command runs every 1-10 minutes, but cache enforces your exact interval.

Q: Why doesn't my 15-second interval check every 15 seconds exactly?
A: The Laravel scheduler runs every minute, then the cache system ensures your configured interval is respected. This is more efficient than running a constant background process.

Q: Can I see which servers trigger most often?
A: Yes! The admin panel includes a "top offenders" statistics endpoint showing frequently triggered servers.

Q: What are the default settings?
A: Monitoring starts disabled. Default threshold: 90%, default action: Kill, default interval: 10 seconds.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

💬 Support

Need help? Got questions? Contact me on BuiltByBit!

Response time: Usually within 24 hours
Support includes: Installation help, bug fixes, configuration assistance, troubleshooting

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​

🎁 Updates & Roadmap

Free lifetime updates
Bug fixes and improvements
Active development

Planned Features:
• Per-server memory thresholds and custom actions
• Grace period before taking action (prevent immediate restarts)
• Cooldown period between actions (prevent spam restarts)
• Memory usage graphs and historical trends
• Whitelist/blacklist specific servers from monitoring
• Export logs to CSV for analysis
• Enhanced statistics dashboard

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔥 GET IT NOW 🔥

Stop memory crashes today!
Automated • Reliable • Essential


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━​
Buy a license now
$5.00
EULA
Standard EULA
Use on any projects you own with attribution
Support
Standard
Includes:
Download the resource
Access new updates
Support from the creator
Support duration
1 year
Share and earn
Refer this resource and earn a 10% commission.
389 Views
0 Purchases
1 Downloads
Feb 3, 2026 Published
Feb 6, 2026 Updated
Not yet rated
18.1 KB File size
Open source
  1. No
DRM-free
  1. Yes
Unobfuscated
  1. No
Type
  1. Analytics & monitoring
Supported versions
  1. 1.12
Supported languages
  1. English
Creator
Owner
Recommended for you
The ultimate screenshare solution for your minecraft server
Not yet rated
2 purchases
Player shop without server shop
Not yet rated
0 purchases
The Ultimate Player-to-Player Trading System
Not yet rated
0 purchases
Version Changer allows you to adjust your minecraft servers version instantly.
5.00 star(s) 14 ratings
553 purchases
Addon Pack with 5 unique addons, the ultimate solution for upgrading your Pterodactyl
5.00 star(s) 23 ratings
482 purchases
Share and earn
Refer this resource and earn a 10% commission.
389 Views
0 Purchases
1 Downloads
Feb 3, 2026 Published
Feb 6, 2026 Updated
Not yet rated
18.1 KB File size
Open source
  1. No
DRM-free
  1. Yes
Unobfuscated
  1. No
Type
  1. Analytics & monitoring
Supported versions
  1. 1.12
Supported languages
  1. English
Creator
Owner
Recommended for you
The ultimate screenshare solution for your minecraft server
Not yet rated
2 purchases
Player shop without server shop
Not yet rated
0 purchases
The Ultimate Player-to-Player Trading System
Not yet rated
0 purchases
Version Changer allows you to adjust your minecraft servers version instantly.
5.00 star(s) 14 ratings
553 purchases
Addon Pack with 5 unique addons, the ultimate solution for upgrading your Pterodactyl
5.00 star(s) 23 ratings
482 purchases
Top