ServerLogSaver
ServerLogSaver
Description
Simply put, this will backup the server.log file to a directory, and then clear the existing server.log file. This is to reduce RAM usage of the server host and effectively reduce lag for server players.
Most of the functions in this are configurable, such as backup location, time delay between backups, choice of Size and Time rotations and more!
Download the Jar
- ServerLogSaver v2.1.1
- ServerLogSaver v2.1.0
- ServerLogSaver v2.0.2
- ServerLogSaver v2.0.1
- ServerLogSaver v2.0
Download the Source
Old Source ServerLogSaver src v0.1b
Commands
- /sls copy
- /sls zip
Current Features
- User defined time for backup intervals (default time is 1 day, 1440 minutes)
- Backups are time stamped for ease of use
- Compress the logs
- Check for 0 byte content
- Console notice (optional)
- Choice of time/size/restart rotations (Time in minutes/Size in KB/Restart only backs up on server start)
- User defined backup storage location
- User defined backup file names (prefix and time setup)
- In-game command to do backups on will
- Choose the number of logs to keep before purging
To-Do
- Record commands used in a separate file (Probably make a separate plugin for this)
- need more ideas, feed back would help :D
Change-Log
Version 2.1.1
- Updated to 1.2.5 R4.0
Version 2.0.2
- No longer backs up as soon as the server starts with 'time' rotation
Version 2.0.1
- Added 'restart' rotation choice
Version 2.0
- Complete re-code
- Added in-game commands
- Updated to latest config
@ProjectInfinity
Well let me put it like this, as how I see it, with a 1.17GB continuously open as opposed to a 10KB file, which would use more of the computers RAM. I would say that it would be the GB one. I may be wrong but past servers that I have visited have show to me that a large server.log file can severely slow things down, hence why i made this.
Hmm, interesting. I am however unable to simulate the event of my server.log using any RAM though. I have made a 1.17GB server.log and I cannot find any difference in RAM useage on my test server, even with a empty server log. The only thing I notice is that it takes longer to start up with a such a big server log.
Are you certain this actually "saves" you RAM? I would very much like to use it if it did.
@ProjectInfinity
That is correct, you can test this out by trying to remove the server.log file while running the server. The main way that this reduces RAM usage is that occasionally some servers log files will get up to ridiculous sizes, nearing 1gb for example, andhaving a 1gb file continuously open can severly impact the rest of the RAM allocation.
I hope that clarified it somewhat for you.
If someone could enlighten me in how this reduces RAM useage, I would be most pleased.
My theory is (a guess without any technical insight) that Bukkit loads the entire server.log instead of just appending to it, externally. Am I right?
@jdcynical
Thank you for the feed back. I have added those to the to-do list and i will be working hard to get them in the next couple of updates. I'm not quite sure what you mean about the ability to rotate logs based on size or age. Could you please expand on this?
Ideas to add:
Thanks! Hope to make it even more useful when some people give me feed back
Congratulations on your first plugin! Looks really useful, good job! :D