My scoreboard.dat gets huge. Startup script that deletes it ?

Discussion in 'Systems Administration' started by ZwPBerserk, Apr 17, 2017.

  1. Hi!

    My scoreboard.dat in my worldfolder gets really huge and starts lagging the server after a few restarts.
    It takes up an enormous amount of memory and makes people then lag on join.

    Does anyone have a way to delete the scoreboard.dat automatically each time the server starts or shuts down ?

    Im using a ./start.sh startup script. (but im not so experienced with that)
    And i am using ubuntu.

    Anyone knows whatever I can put into that so it deletes my world scoreboard.dat file ?
     
  2. MiniDigger

    Supporter

    why not fix the scoreboard? sounds saner to me.

    if you run a server you should really know how to delete a file via bash tho....
     
  3. If you must delete the file, put this line of code before the "java ..."

    Code (Text):
    rm path/to/scoreboard.dat
    The path starts at wherever the start.sh file is.
     
    • Winner Winner x 1
  4. well, before randomly deleting files in your server directory, you should properly figure out what they do, why they are so big, and what will happen if you delete them.

    The scoreboard file contain the information for the /scoreboard command, if the scoreboard has been set to track scores, all the information about it will be saved here, some plugins uses the scoreboard as there storage, so deleting it will cause data loss in those plugins.
    If the scoreboard is delete from ingame using the commands, the scoreboard file will automatically become smaller, since you claim that your scoreboard file is "really huge" something is obviously using it.

    Try going on the server and do
    /scoreboard objectives list
    /scoreboard teams list
    /scoreboard players list

    Those commands will tell you what is currently using the scoreboard, the normal culprits would be:
    Admins/moderators that don't know what they are doing (Usually safe to delete those scores)
    Admins/moderators that do know what they are doing (You should ask them before deleting it)
    They might be parts of minigames that help the minigame track player status (If you delete the scoreboard the minigames might stop working)
    The might be parts of plugins (mcmmo seems to use it a lot) (As said above, deleting the scoreboard would cause data loss in those plugins)


    If you actually decide that deleting the file is the only way to go, atleast dont delete it, simply rename it, so when you figure out what is broken, you can just move the file back
     
    #4 weboy, Apr 18, 2017
    Last edited: Apr 18, 2017
    • Like Like x 1
  5. Thanks for the replies. I would love to fix the scoreboard but its plugins filling it like mythicmobs.
    It seems it doesnt remove it entirely and it takes op to 30mb. It doesnt reset it or anything on start up or shutdown.

    I am already deleting it manually and havent got any issues so far. I also use mcmmo and i dont believe it has any issues with removing the scoreboard.dat (as far as i noticed).

    in the scoreboard objectives list i only see mythicmobs stuff.

    I will just add the line to my startup script. Thx for that.

    If you guys know any other solution I would be glad to hear it. <3

    Because im new to ubuntu and I ran my server on windows and after that on rented server softwares.
    So what does me not knowing ubuntu have anything to do with me being capable of running a server. :p
     
  6. MiniDigger

    Supporter

    if you server runs linux and you can't write a script that deletes a file, you can't run a server :D
    actually, the bash syntax for the remove command is kinda the same as the batch one ;)
     
  7. I was running the server just fine.
    But if you feel better talking down to people, go ahead.
    Just dont go on a forum trying to help people this way. You come over like a person that needs to boost his own confidence to feel good about himself.
     
    • Like Like x 1
  8. MiniDigger

    Supporter

    I was trying to give you subtile hints as I don't like spoonfeeding ppl. I am really don't need to boost my confidence, lol. developing is my day job.
    rm <file> deletes a file in linux. so it would be rm /world/scoreboard.dat
    if you enter that before your java command in your start file, you should be fine.
     
    • Like Like x 1
  9. Yes, I figured it out. Thanks though.

    This is what I have right now:
    https://pastebin.com/2CGF8Zm8

    (the java line is just 1 line. pastebin puts it above eachother) :p