MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
490 stars 61 forks source link

start with different ram allocation #223

Closed lSh4dowl closed 5 years ago

lSh4dowl commented 5 years ago

When trying to start with mscs-server-command=-Xms$1024M -Xmx$3072M it returns cannot get process id and does not start. Is my Syntax wrong ?

sandain commented 5 years ago

Get rid of the dollar signs

zanix commented 5 years ago

This might help https://github.com/MinecraftServerControl/mscs/blob/master/README.md#adjusting-world-properties

While you can alter the server command, if you are only changing the memory options it's easier to use mscs-initial-memory and mscs-maximum-memory

mscs-initial-memory=1024M
mscs-maximum-memory=3072M
sandain commented 5 years ago

@zanix has a better answer :)

Don't modify the server command unless you really need to. Instead use mscs-initial-memory and mscs-maximum-memory.

If you do need to modify it, here is the default version:

mscs-server-command=$JAVA -Xms$INITIAL_MEMORY -Xmx$MAXIMUM_MEMORY -jar $SERVER_LOCATION/$SERVER_JAR $SERVER_ARGS

A minimal edit for just the memory would be

mscs-server-command=$JAVA -Xms1024M -Xmx3072M -jar $SERVER_LOCATION/$SERVER_JAR $SERVER_ARGS
lSh4dowl commented 5 years ago

Hey thanks, I tried without the $ signs before, sorry I didn't mention that but it didn't work. @zanix's Solution works, thanks for the quick help. I didn't realize before that this option exists.