Prune "Connection reset" spam from the server.log

Discussion in 'Bukkit Tools' started by palisade, Apr 6, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    If you're as annoyed as I am by the constant stream of "Connection reset" messages showing up in your logs, making them difficult to read, then you'll be interested in this Linux script. Toss this in a file called prunelog and chmod +x it:

    sed -i '/Connection reset/d' server.log
    When you run this, it will change the file in-place (-i option), finding instances of lines containing the string "Connection reset" and removing them. If you want to place the script somewhere like your bin path instead of your mc path, change server.log in the script to point to where your server.log is located.

    Or, you could just type this sed command out yourself if you don't mind just typing it, it's not long.

    Hope this helps.
    Jacek likes this.
  2. Offline


    Thank you ! This small script serves me well !

    I use crontab to make the clean each hour :
    "crontab -e" then :
    0 * * * * ./
    Edit :
    Don't do that 'cause it will freeze your server.log and it will not be updated... Your server seems to be off to use
Thread Status:
Not open for further replies.

Share This Page