Overview
Each configured process (server or network) can be independently controlled using standard lifecycle commands. McDis-RCON manages processes using Python’ssubprocess.Popen, similar to MCDReforged, without modifying your server files.
Control Methods
You can control processes through three different interfaces:Discord Panel
Use
!! commands or panel buttonsConsole Threads
Send commands directly in console threads
Terminal
Use the McDis-RCON CLI interface
Process Commands
Start Command
Initiates a process using the configuredstart_cmd.
- McDis creates necessary directories (
.mdplugins,.mdcommands) - Process is spawned using
subprocess.Popenwith the configured command - Console output streaming begins
- Process plugins are loaded
- Console thread shows
[Initializing Process...]
The start command uses your configured
start_cmd from md_config.yml. Make sure this command is correct for your server type.Stop Command
Gracefully stops a process using the configuredstop_cmd.
- McDis sends the
stop_cmdto the process stdin - Process begins shutdown sequence
- McDis waits for process to terminate naturally
- Plugins are unloaded after process stops
- Console thread shows
[Process Stopped]
McDis-RCON waits indefinitely for the process to stop gracefully. If the process hangs, use the
kill command instead.Restart Command
Stops and then starts a process in sequence.- Stop command is executed
- McDis waits for process to fully terminate
- Start command is automatically executed
- New process begins with fresh state
Kill Command
Forcefully terminates a process without waiting for graceful shutdown.- McDis sends SIGKILL to the subprocess
- McDis also identifies and kills the actual Java process
- Process terminates immediately
- Plugins are unloaded
- Console thread shows
[Process Stopped]
- Server is frozen and not responding to stop command
- Process is stuck in infinite loop
- Emergency shutdown required
- Server hangs during shutdown
Batch Operations
Control multiple processes simultaneously using-all suffix:
Batch operations execute commands on all configured processes, including both servers and networks.
Panel Button Interface
The Discord panel provides an interactive button interface for process control.Accessing Process Controls
Click Processes Button
In the main panel, click the Processes button to expand the process control interface.
Execute Command
Click the desired action button:
- ▶️ Start - Start the selected process
- ⏹️ Stop - Stop the selected process
- 🔄 Restart - Restart the selected process
- ⚠️ Kill - Force kill the selected process
Process States
Processes in McDis-RCON have the following states:Running
- Process is active and accepting commands
- Console output is being relayed to Discord
- Plugins are loaded and active
- RAM and disk usage are trackable
Stopped
- No active process
- Console output is not being streamed
- Plugins are unloaded
- Can be started at any time
Starting
- Process is being initialized
- Console shows
[Initializing Process...] - Brief state during startup sequence
Stopping
- Stop command has been sent
- Process is shutting down gracefully
- Console output still being relayed
- Transitions to Stopped when complete
Advanced Process Management
Finding Real Processes
McDis-RCON tracks both the subprocess and the actual Java process:Graceful Shutdown on Exit
When McDis-RCON itself is shutting down (Ctrl+C orexit command):
60-Second Grace Period
McDis waits up to 60 seconds for processes to close gracefully.Console displays countdown:
This behavior is handled by the signal handler for SIGINT (Ctrl+C) and ensures servers are properly shut down even when McDis itself is terminated.
Console Command Execution
Any text sent to a console thread that isn’t a McDis command is forwarded to the server:Resource Monitoring
RAM Usage
View current RAM usage for running processes:Disk Usage
Disk usage for each process directory is calculated and displayed:Process Configuration
Each process is configured inmd_config.yml:
Server Configuration
Network Configuration
Network processes often use
end instead of stop as their stop command. Check your proxy software documentation.Troubleshooting
Process starts but immediately stops
Process starts but immediately stops
Possible causes:
- Incorrect
start_cmdin configuration - Missing server files (server.jar, etc.)
- Java not in PATH
- Insufficient RAM
- Port already in use
Process won't stop gracefully
Process won't stop gracefully
Possible causes:
- Incorrect
stop_cmdin configuration - Server plugin preventing shutdown
- Server frozen or deadlocked
kill command to force termination. Review server logs for shutdown errors.Console shows 'Process Stopped' but server still running
Console shows 'Process Stopped' but server still running
Possible causes:
- Server started outside of McDis-RCON
- Process tracking lost due to error
Can't execute commands in server
Can't execute commands in server
Possible causes:
- Process is not running
- Wrong console thread
- Server not accepting stdin
Best Practices
Use Stop, Not Kill
Always use the
stop command for shutdowns. Only use kill in emergencies to prevent data loss.Wait for Full Startup
Allow servers to fully start before executing commands or restarting again.
Monitor Console Output
Watch the console thread during start/stop to catch errors early.
Test Start Commands
Verify your start commands work correctly before adding them to configuration.
Related Features
Console Relay
Learn how console output is streamed
Discord Panel
Master the panel interface
Configuration
Configure process settings
Backup System
Back up servers before major changes
