Jenkins日志容量15G

1、每次手动删除 /var/log/jenkins/jenkins.log 该文件,而且删除后需要重启下jenkins,不然空间不能释放出来。

2、点击 系统管理-System Log-日志级别,然后增加  javax.jmdns为off

        Manage Jenkins -> System Log -> Log Levels (on the left)

        Name: javax.jmdns

        Level: off

http://www.tinygroup.org/blog/detail/fee939817ebf45a6a97ae7cdefc767e6


带图的:http://blog.csdn.net/qq_33588470/article/details/54647496



Modify JAVA_ARGS in /etc/default/jenkins (location for Debian / Ubuntu installations at least) to disable DNS multicast feature.

Change this: JAVA_ARGS="-Djava.awt.headless=true"

To this: JAVA_ARGS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"

And restart the service service jenkins restart
大意是修改jenkins文件的JAVA_ARGS,这个英文不难,修改一下配置 翻译和不翻译一样

https://stackoverflow.com/questions/31719756/how-to-stop-jenkins-log-from-becoming-huge


http://brandnewuser.iteye.com/blog/2280833


修改日志配置(未知):https://stackoverflow.com/questions/22783471/limiting-log-size-of-jenkins-log-or-hudson-log

/var/log/jenkins/jenkins.log /var/log/jenkins/access_log {
    compress
    dateext
    maxage 365
    rotate 99
    size=+4096k
    notifempty
    missingok
    create 644
    postrotate
      if [ -s /var/run/jenkins.pid ]; then
        JPID=`cat /var/run/jenkins.pid`
        test -n "`find /proc/$JPID -maxdepth 0 -user jenkins 2>/dev/null`" && /bin/kill -s ALRM $JPID || :
      fi
    endscript
}


另一种:

/var/log/jenkins/jenkins.log {
        weekly
        copytruncate
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
}


过程中找到一个好玩的东西,为日志添加颜色:https://zhuanlan.zhihu.com/p/22032462?refer=debugtalk



猜你喜欢

转载自blog.csdn.net/ma15732625261/article/details/78151576