• Nacos日志磁盘空间排查


    1、Tomcat的access日志

    access日志大量打印,这个日志是Spring Boot提供的tomcat访问日志打印,Spring Boot在关于该日志的选项中,没有最大保留天数或者日志大小控制的选项。

    1.1日志位置

    /nacos/bin/logs

    -rw-r--r-- 1 root root 162M Oct  2 00:00 access_log.2023-10-01.log
    -rw-r--r-- 1 root root 162M Oct  3 00:00 access_log.2023-10-02.log
    -rw-r--r-- 1 root root 162M Oct  4 00:00 access_log.2023-10-03.log
    -rw-r--r-- 1 root root 162M Oct  4 23:59 access_log.2023-10-04.log
    -rw-r--r-- 1 root root 162M Oct  6 00:00 access_log.2023-10-05.log
    -rw-r--r-- 1 root root 162M Oct  7 00:00 access_log.2023-10-06.log
    -rw-r--r-- 1 root root 162M Oct  8 00:00 access_log.2023-10-07.log

    1.2关闭日志

    配置文件位置:/nacos/conf/application.properties

    server.tomcat.accesslog.enabled=false

    2、服务端业务日志

    此种日志修改服务端日志配置文件即可。

    2.1日志位置

    /nacos/logs

    -rw-r--r-- 1 root root     6741 Apr 19 16:33 alipay-jraft.log.2023-04-19.0
    -rw-r--r-- 1 root root        0 Mar 17  2023 cmdb-main.log
    -rw-r--r-- 1 root root   499225 Oct  8 10:16 config-client-request.log
    -rw-r--r-- 1 root root  1165609 Oct  1 23:59 config-client-request.log.2023-10-01.0
    -rw-r--r-- 1 root root  1165544 Oct  2 23:59 config-client-request.log.2023-10-02.0
    -rw-r--r-- 1 root root  1165542 Oct  3 23:59 config-client-request.log.2023-10-03.0
    -rw-r--r-- 1 root root  1165544 Oct  4 23:59 config-client-request.log.2023-10-04.0
    -rw-r--r-- 1 root root  1165542 Oct  5 23:59 config-client-request.log.2023-10-05.0
    -rw-r--r-- 1 root root  1165610 Oct  6 23:59 config-client-request.log.2023-10-06.0
    -rw-r--r-- 1 root root  1169237 Oct  7 23:59 config-client-request.log.2023-10-07.0
    -rw-r--r-- 1 root root     1152 Oct  7 17:45 config-dump.log
    -rw-r--r-- 1 root root    29097 Oct  8 10:10 config-fatal.log
    -rw-r--r-- 1 root root    68688 Oct  1 23:59 config-fatal.log.2023-10-01.0
    -rw-r--r-- 1 root root    68688 Oct  2 23:59 config-fatal.log.2023-10-02.0
    -rw-r--r-- 1 root root    68688 Oct  3 23:59 config-fatal.log.2023-10-03.0
    -rw-r--r-- 1 root root    68688 Oct  4 23:59 config-fatal.log.2023-10-04.0
    -rw-r--r-- 1 root root    68688 Oct  5 23:59 config-fatal.log.2023-10-05.0
    -rw-r--r-- 1 root root    68688 Oct  6 23:59 config-fatal.log.2023-10-06.0
    -rw-r--r-- 1 root root    68688 Oct  7 23:59 config-fatal.log.2023-10-07.0
    -rw-r--r-- 1 root root   966054 Oct  8 10:16 config-memory.log
    -rw-r--r-- 1 root root  2255040 Oct  1 23:59 config-memory.log.2023-10-01.0
    -rw-r--r-- 1 root root  2254947 Oct  2 23:59 config-memory.log.2023-10-02.0
    -rw-r--r-- 1 root root  2254980 Oct  3 23:59 config-memory.log.2023-10-03.0
    -rw-r--r-- 1 root root  2255040 Oct  4 23:59 config-memory.log.2023-10-04.0
    -rw-r--r-- 1 root root  2254932 Oct  5 23:59 config-memory.log.2023-10-05.0
    -rw-r--r-- 1 root root  2255040 Oct  6 23:59 config-memory.log.2023-10-06.0
    -rw-r--r-- 1 root root  2254947 Oct  7 23:59 config-memory.log.2023-10-07.0
    -rw-r--r-- 1 root root        0 Mar 17  2023 config-notify.log
    -rw-r--r-- 1 root root     1276 Oct  7 17:45 config-pull-check.log
    -rw-r--r-- 1 root root        0 Mar 17  2023 config-pull.log
    -rw-r--r-- 1 root root     3509 Apr 23 09:09 config-server.log
    -rw-r--r-- 1 root root     3509 Apr 19 16:03 config-server.log.2023-04-19.0
    -rw-r--r-- 1 root root     4424 Oct  7 17:45 config-trace.log
    -rw-r--r-- 1 root root        0 Mar 17  2023 core-auth.log
    -rw-r--r-- 1 root root        0 Mar 17  2023 istio-main.log
    -rw-r--r-- 1 root root        0 Mar 17  2023 nacos-address.log
    -rw-r--r-- 1 root root      434 Apr 23 09:09 nacos-cluster.log
    -rw-r--r-- 1 root root      434 Apr 19 16:03 nacos-cluster.log.2023-04-19.0
    -rw-r--r-- 1 root root  8644041 Oct  8 10:13 nacos_gc.log.0.current
    -rw-r--r-- 1 root root    27562 Oct  8 10:11 nacos.log
    -rw-r--r-- 1 root root    49541 Oct  1 23:59 nacos.log.2023-10-01.0
    -rw-r--r-- 1 root root    51173 Oct  2 23:59 nacos.log.2023-10-02.0
    -rw-r--r-- 1 root root    49441 Oct  3 23:59 nacos.log.2023-10-03.0
    -rw-r--r-- 1 root root    50668 Oct  4 23:59 nacos.log.2023-10-04.0
    -rw-r--r-- 1 root root    50568 Oct  5 23:59 nacos.log.2023-10-05.0
    -rw-r--r-- 1 root root    55814 Oct  6 23:59 nacos.log.2023-10-06.0
    -rw-r--r-- 1 root root    48384 Oct  7 23:59 nacos.log.2023-10-07.0
    -rw-r--r-- 1 root root       54 Apr 23 09:09 naming-distro.log
    -rw-r--r-- 1 root root       54 Apr 19 16:03 naming-distro.log.2023-04-19.0
    -rw-r--r-- 1 root root     1189 Oct  7 09:51 naming-event.log
    -rw-r--r-- 1 root root   185045 Oct  8 10:16 naming-performance.log
    -rw-r--r-- 1 root root   431435 Oct  1 23:59 naming-performance.log.2023-10-01.0
    -rw-r--r-- 1 root root   431712 Oct  2 23:59 naming-performance.log.2023-10-02.0
    -rw-r--r-- 1 root root   431712 Oct  3 23:59 naming-performance.log.2023-10-03.0
    -rw-r--r-- 1 root root   431712 Oct  4 23:59 naming-performance.log.2023-10-04.0
    -rw-r--r-- 1 root root   431712 Oct  5 23:59 naming-performance.log.2023-10-05.0
    -rw-r--r-- 1 root root   431712 Oct  6 23:59 naming-performance.log.2023-10-06.0
    -rw-r--r-- 1 root root   432579 Oct  7 23:59 naming-performance.log.2023-10-07.0
    -rw-r--r-- 1 root root    41470 Oct  7 09:52 naming-push.log
    -rw-r--r-- 1 root root     1759 Apr 23 09:09 naming-raft.log
    -rw-r--r-- 1 root root     1584 Apr 19 16:03 naming-raft.log.2023-04-19.0
    -rw-r--r-- 1 root root        0 Mar 17  2023 naming-rt.log
    -rw-r--r-- 1 root root     5069 Oct  7 09:52 naming-server.log
    -rw-r--r-- 1 root root        0 Mar 17  2023 protocol-distro.log
    -rw-r--r-- 1 root root     1524 Apr 23 09:09 protocol-raft.log
    -rw-r--r-- 1 root root     1524 Apr 19 16:03 protocol-raft.log.2023-04-19.0
    -rw-r--r-- 1 root root  4515342 Oct  8 10:16 remote-digest.log
    -rw-r--r-- 1 root root 10539702 Oct  1 23:59 remote-digest.log.2023-10-01.0
    -rw-r--r-- 1 root root 10540068 Oct  2 23:59 remote-digest.log.2023-10-02.0
    -rw-r--r-- 1 root root 10540068 Oct  3 23:59 remote-digest.log.2023-10-03.0
    -rw-r--r-- 1 root root 10539702 Oct  4 23:59 remote-digest.log.2023-10-04.0
    -rw-r--r-- 1 root root 10540068 Oct  5 23:59 remote-digest.log.2023-10-05.0
    -rw-r--r-- 1 root root 10540068 Oct  6 23:59 remote-digest.log.2023-10-06.0
    -rw-r--r-- 1 root root 10539702 Oct  7 23:59 remote-digest.log.2023-10-07.0
    -rw-r--r-- 1 root root      767 Apr 23 09:09 remote.log
    -rw-r--r-- 1 root root      767 Apr 19 16:03 remote.log.2023-04-19.0
    -rw-r--r-- 1 root root        0 Mar 17  2023 remote-push.log
    -rw-r--r-- 1 root root     4367 Apr 23 09:09 start.out
    -rw-r--r-- 1 root root        0 Mar 17  2023 tps-control-detail.log
    -rw-r--r-- 1 root root     4264 Oct  7 09:52 tps-control-digest.log
    -rw-r--r-- 1 root root    11405 Apr 23 09:10 tps-control.log
    -rw-r--r-- 1 root root    11408 Apr 19 16:05 tps-control.log.2023-04-19.0

    2.2修改日志输出配置

    配置文件位置:/nacos/conf/nacos-logback.xml

    3、客户端心跳日志

    控制台心跳日志,yml配置日志级别即可application.yml添加

    3.1配置

    1. logging:
    2. level:
    3. com:
    4. alibaba:
    5. nacos: warn

    4、Nacos config naming 日志

    4.1位置

    /root/logs/nacos

    -rw-r--r-- 1 root root     7767 Oct  7 09:51 config.log
    -rw-r--r-- 1 root root  9889775 Oct  8 10:26 naming.log
    -rw-r--r-- 1 root root 10486641 Oct  1 21:28 naming.log.2023-10-01.1
    -rw-r--r-- 1 root root 10486745 Oct  1 21:29 naming.log.2023-10-01.2
    -rw-r--r-- 1 root root  4938222 Oct  1 23:59 naming.log.2023-10-01.3
    -rw-r--r-- 1 root root  4894616 Oct  1 23:59 naming.log.2023-10-01.4
    -rw-r--r-- 1 root root 10486773 Oct  2 13:35 naming.log.2023-10-01.5
    -rw-r--r-- 1 root root  9231884 Oct  2 23:59 naming.log.2023-10-01.6
    -rw-r--r-- 1 root root 10486755 Oct  2 05:22 naming.log.2023-10-01.7
    -rw-r--r-- 1 root root 10486651 Oct  2 21:28 naming.log.2023-10-02.1
    -rw-r--r-- 1 root root 10486764 Oct  2 21:29 naming.log.2023-10-02.2
    -rw-r--r-- 1 root root  4932803 Oct  2 23:59 naming.log.2023-10-02.3
    -rw-r--r-- 1 root root  4894606 Oct  2 23:59 naming.log.2023-10-02.4
    -rw-r--r-- 1 root root 10486631 Oct  3 05:22 naming.log.2023-10-02.5
    -rw-r--r-- 1 root root 10487842 Oct  3 13:35 naming.log.2023-10-02.6
    -rw-r--r-- 1 root root 10486755 Oct  3 05:22 naming.log.2023-10-02.7
    -rw-r--r-- 1 root root 10486651 Oct  3 21:28 naming.log.2023-10-03.1
    -rw-r--r-- 1 root root 10486750 Oct  3 21:29 naming.log.2023-10-03.2
    -rw-r--r-- 1 root root  4938212 Oct  3 23:59 naming.log.2023-10-03.3
    -rw-r--r-- 1 root root  4893542 Oct  3 23:59 naming.log.2023-10-03.4
    -rw-r--r-- 1 root root  9231884 Oct  4 23:59 naming.log.2023-10-03.5
    -rw-r--r-- 1 root root 10486651 Oct  4 05:22 naming.log.2023-10-03.6
    -rw-r--r-- 1 root root 10486764 Oct  4 05:22 naming.log.2023-10-03.7
    -rw-r--r-- 1 root root 10486651 Oct  4 21:28 naming.log.2023-10-04.1
    -rw-r--r-- 1 root root 10486789 Oct  4 21:29 naming.log.2023-10-04.2
    -rw-r--r-- 1 root root  4938212 Oct  4 23:59 naming.log.2023-10-04.3
    -rw-r--r-- 1 root root  4893532 Oct  4 23:59 naming.log.2023-10-04.4
    -rw-r--r-- 1 root root 10486768 Oct  5 13:35 naming.log.2023-10-04.5
    -rw-r--r-- 1 root root 10486735 Oct  5 05:22 naming.log.2023-10-04.6
    -rw-r--r-- 1 root root  9230815 Oct  5 23:59 naming.log.2023-10-04.7
    -rw-r--r-- 1 root root 10486680 Oct  5 21:28 naming.log.2023-10-05.1
    -rw-r--r-- 1 root root 10486774 Oct  5 21:29 naming.log.2023-10-05.2
    -rw-r--r-- 1 root root  4937109 Oct  5 23:59 naming.log.2023-10-05.3
    -rw-r--r-- 1 root root  4894616 Oct  5 23:59 naming.log.2023-10-05.4
    -rw-r--r-- 1 root root  9231884 Oct  6 23:59 naming.log.2023-10-05.5
    -rw-r--r-- 1 root root 10486735 Oct  6 05:22 naming.log.2023-10-05.6
    -rw-r--r-- 1 root root 10487842 Oct  6 13:35 naming.log.2023-10-05.7
    -rw-r--r-- 1 root root 10486670 Oct  6 21:28 naming.log.2023-10-06.1
    -rw-r--r-- 1 root root 10486750 Oct  6 21:29 naming.log.2023-10-06.2
    -rw-r--r-- 1 root root  4932764 Oct  6 23:59 naming.log.2023-10-06.3
    -rw-r--r-- 1 root root  4894645 Oct  6 23:59 naming.log.2023-10-06.4
    -rw-r--r-- 1 root root 10486770 Oct  7 05:22 naming.log.2023-10-06.5
    -rw-r--r-- 1 root root 10486670 Oct  7 05:22 naming.log.2023-10-06.6
    -rw-r--r-- 1 root root  3765018 Oct  7 09:47 naming.log.2023-10-06.7
    -rw-r--r-- 1 root root 10487528 Oct  7 21:25 naming.log.2023-10-07.1
    -rw-r--r-- 1 root root 10486525 Oct  7 21:26 naming.log.2023-10-07.2
    -rw-r--r-- 1 root root  5040114 Oct  7 23:59 naming.log.2023-10-07.3
    -rw-r--r-- 1 root root  4986649 Oct  7 23:59 naming.log.2023-10-07.4
    -rw-r--r-- 1 root root 10487488 Oct  8 05:21 naming.log.2023-10-07.5
    -rw-r--r-- 1 root root  8049108 Oct  8 10:26 naming.log.2023-10-07.6
    -rw-r--r-- 1 root root 10486525 Oct  8 05:22 naming.log.2023-10-07.7
    -rw-r--r-- 1 root root  4015164 Oct  8 10:26 naming.log.2023-10-08.1
    -rw-r--r-- 1 root root  9913022 Oct  8 10:26 naming.log.2023-10-08.2

  • 相关阅读:
    [Kubernetes] etcd 单机和集群部署
    PCL 点云转深度图像
    【Spark 实战系列】sparkstreaming 任务出现堆积如何优化?(流量突然大增资源不够怎么办?)
    计算机网络篇之MAC地址
    O2OA(翱途)开发平台 V8.2即将发布,更安全、更高效、更开放
    LTD248次升级 | 竞赛数字化:在线答题赛、反复多轮赛,答题领取现金 • 官微名片展示个人简介 • 官网可搜索各类文件
    NodeRed通过node-red-contrib-opcua读取kepware数据
    【yolo系列:YOLOV7改进-添加EIOU,SIOU,AlphaIOU,FocalEIOU.】
    AUTOSAR汽车电子嵌入式编程精讲300篇-基于 CAN 总线的车辆数据采集与远程监控系统研发(中)
    【人脸识别】Octuplet Loss:一个可以提高低分辨率和跨分辨率人脸识别效果的损失
  • 原文地址:https://blog.csdn.net/qq_34253002/article/details/132018990