Logfiles werden nicht bereinigt

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • flump
    Extension Master
    • 20.07.2016
    • 136

    #1

    Logfiles werden nicht bereinigt

    Mein Loxberry läuft in einer VM auf meiner Synology DS220+.

    Beim healthcheck bekomme ich folgende Warnung:
    WARNING Log Database Checks the consistence of the Logfile Database Init logfile database is ok. 95493 log sessions with 1235369 attributes stored. 94770 logfiles are managed. Database size is 77.8MB. This is exceptionally BIG! Wiki
    Was kann ich tun um das Problem zu lösen?

    Installierte plugins:
    - Cam-Connect
    - MotionEye
    - PV Solcast
    - RPi-Monitor
    - TCP2UDP
    - Weather4Loxone
    - Wifi Presence Unif

    Bei den letzten beiden Plugins häuft sich eine Unmenge an Logfiles an.
    Loglevel ist auf "Fehler".

    LG
  • Prof.Mobilux
    Supermoderator
    • 25.08.2015
    • 5359

    #2
    Bei weather4lox sind das nur Einzräge in der DB. Das ist unkritisch.

    Warum die DB nicht bereinigt wird ist seltsam. Reboot hilft nicht?
    🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


    LoxBerry - Beyond the Limits

    Kommentar


    • flump
      flump kommentierte
      Kommentar bearbeiten
      Ein Reboot hat nichts geändert.
      Ich habe die logs manuell gelöscht, das wird aber nicht nachhaltig sein...

    • scharrin
      scharrin kommentierte
      Kommentar bearbeiten
      Hallo,

      Ist bei mir dass selbe. Ich muss immer wieder manuell die Log-Daten löschen.

      Viele Grüße
      ChRiatin
  • Prof.Mobilux
    Supermoderator
    • 25.08.2015
    • 5359

    #3
    Was steht denn in den Maintenance Logs unter
    Code:
    /opt/loxberry/log/system_tmpfs
    ?
    🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


    LoxBerry - Beyond the Limits

    Kommentar

    • flump
      Extension Master
      • 20.07.2016
      • 136

      #4
      Hier ein Auszug von letzter Nacht. Diese Files hab ich für jede Stunde.

      Code:
      loxberry@loxberry:~/log/system_tmpfs $ cat 20251123_041302_236_Log\ Maintenance.log
      ================================================================================
      <LOGSTART> 23.11.2025 04:13:02 TASK STARTED
      <LOGSTART>
      04:13:02.257 <INFO> LoxBerry Version 3.0.1.3 ( is_arch_x86_64.cfg is_hwmodel_x86_64_vm.cfg is_x64.cfg )
      04:13:02.257 <INFO> Loglevel: 6
      04:13:03.962 <INFO> Notify maintenance: reduce_notifys called.
      04:13:03.968 <INFO>    Found 1 notifications in total
      04:13:03.968 <OK> Notification-Cleanup finished.  cleared.
      <LOGEND> 23.11.2025 04:13:03 TASK FINISHED
      loxberry@loxberry:~/log/system_tmpfs $ ^C
      loxberry@loxberry:~/log/system_tmpfs $ cat 20251123_041304_262_Log\ Maintenance.log
      ================================================================================
      <LOGSTART> 23.11.2025 04:13:04 TASK STARTED
      <LOGSTART>
      04:13:04.304 <INFO> LoxBerry Version 3.0.1.3 ( is_arch_x86_64.cfg is_hwmodel_x86_64_vm.cfg is_x64.cfg )
      04:13:04.304 <INFO> Loglevel: 6
      04:13:05.204 <INFO> Logfile maintenance: reduce_logfiles called.
      <LOGEND> 23.11.2025 04:13:20 TASK FINISHED
      loxberry@loxberry:~/log/system_tmpfs $ ^C
      loxberry@loxberry:~/log/system_tmpfs $ cat 20251123_042302_808_Log\ Maintenance.log
      ================================================================================
      <LOGSTART> 23.11.2025 04:23:02 TASK STARTED
      <LOGSTART>
      04:23:02.847 <INFO> LoxBerry Version 3.0.1.3 ( is_arch_x86_64.cfg is_hwmodel_x86_64_vm.cfg is_x64.cfg )
      04:23:02.847 <INFO> Loglevel: 6
      04:23:03.973 <INFO> Sleeping 20 seconds to not colidate with other jobs...
      04:23:27.912 <OK> LogDB backed up on SDCard.
      <LOGEND> 23.11.2025 04:23:27 TASK FINISHED
      loxberry@loxberry:~/log/system_tmpfs $
      Der Loxberry Selbsttest zeigt folgendes. Die Logs wurden gestern am Nachmittag gelöscht.

      OK LoxBerry Version Checks the LoxBerry Version Current Version: 3.0.1.3 / No newer Release available. Wiki
      INFO Linux Kernel Checks the current installed Linux Kernel Linux loxberry 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64 GNU/Linux
      INFO System Architecture Checks the system architecture x86_64 / Virtual Machine (x86_64)
      INFO CPU Temperature Checks maximum CPU Temperature No history data (only available on Raspberrys). Cannot read current cpu temperature. No data available.
      INFO Voltage Checks the voltage of the power supply Cannot determine voltage status (only available on Raspberrys). Wiki
      OK RootFS Checks if the RootFS is mounted correctly RootFS is mounted ReadWrite. This is fine.
      OK RootFS free space Checks the rootfs for available space LoxBerry's RootFS has more than 10% free discspace (AVAL 3.3GB/SIZE 9.8GB).
      OK RAMDiscs free space Checks the ramdiscs for available space All ramdiscs have more than 25% free discspace. Wiki
      OK System Load Checks the system load The system load is: 0.81 0.81 0.61 3/150 94530. Your system has 1 CPUs installed. The load is fine - maybe LoxBerry is even bored :-) Wiki
      OK Log Database Checks the consistence of the Logfile Database Init logfile database is ok. 2651 log sessions with 34315 attributes stored. 2618 logfiles are managed. Database size is 2.2MB. Wiki
      OK Notification Database Checks the consistence of the Notification Database Init notification database is ok. 1 notifications with 12 attributes stored. It contains 0 info and 0 error notifications.Database size is 16.0KB.
      OK Miniserver Access Checks access to your Miniservers RSPD OK (admin user). Wiki
      OK Reboot required Checks if LoxBerry or a plugin requests a reboot LoxBerry and plugins do not require a reboot of your LoxBerry. Wiki
      OK MQTT Checks LoxBerry's MQTT Server and MQTT Gateway MQTT Gateway running (PID 1624). Current status: MQTT Server state: Connected and subscribed to MQTT Server. Config state: Configfile present. UDP-IN state: UDP-IN socket connected. Your keepaliveepoch is current. Wiki
      OK Plugin Loglevels Checks for debug loglevel No plugin is configured for loglevel DEBUG. (Some plugins may have it's own setting)

      Kommentar

      • scharrin
        LoxBus Spammer
        • 25.08.2015
        • 336

        #5
        Hallo,
        bei mir steht im letzten Logfile:

        Code:
        loxberry@loxberry:~/log/system_tmpfs $ more '20251123_161301_470_Log Maintenance.log'
        ================================================================================
        <LOGSTART> 23.11.2025 16:13:01 TASK STARTED
        <LOGSTART>
        16:13:01.479 <INFO> LoxBerry Version 3.0.1.3 ( is_arch_x86_64.cfg is_x64.cfg is_hwmodel_x86_64_vm
        .cfg )
        16:13:01.479 <INFO> Loglevel: 6
        16:13:01.488 <INFO> Logfile maintenance: reduce_logfiles called.
        <LOGEND> 23.11.2025 16:13:07 TASK FINISHED
        Was aber auffällig ist:

        loxberry@loxberry:~/log/system_tmpfs $ ls -ltr

        Code:
        ...
        -rw-r--r-- 1 loxberry  loxberry      492 23. Nov 14:13 '20251123_141301_389_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry      381 23. Nov 14:13 '20251123_141301_498_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry      492 23. Nov 15:13 '20251123_151302_064_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry      381 23. Nov 15:13 '20251123_151302_170_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry      492 23. Nov 16:13 '20251123_161301_364_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry      381 23. Nov 16:13 '20251123_161301_470_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry 12795904 23. Nov 16:53  logs_sqlite.dat
        -rw-r----- 1 loxberry  loxberry   517509 23. Nov 17:10  mosquitto.log.gz
        -rw-r--r-- 1 loxberry  loxberry      492 23. Nov 17:13 '20251123_171301_760_Log Maintenance.log'
        -rw-r--r-- 1 loxberry  loxberry  1592843 23. Nov 17:13  mqttfinder.log.gz
        -rw-r--r-- 1 loxberry  loxberry   669345 23. Nov 17:13  mqttgateway.log.gz
        -rw-r--r-- 1 loxberry  loxberry      381 23. Nov 17:13 '20251123_171301_881_Log Maintenance.log'
        -rw-r----- 1 mosquitto loxberry  4644411 23. Nov 17:50  mosquitto.log
        -rw-r--r-- 1 loxberry  loxberry 13966832 23. Nov 17:55  logs_sqlite.dat-wal
        -rw-r--r-- 1 loxberry  loxberry    32768 23. Nov 17:55  logs_sqlite.dat-shm
        -rw-r--r-- 1 loxberry  loxberry  6213150 23. Nov 17:55  mqttgateway.log
        -rw-r--r-- 1 loxberry  loxberry 15426761 23. Nov 17:55  mqttfinder.log
        Also bei den Maintenance-Logs beinhaltet der Dateiname am Anfang und am Ende jeweils ein Hochkomma '

        Viele Grüße
        Christian

        Kommentar

        • Prof.Mobilux
          Supermoderator
          • 25.08.2015
          • 5359

          #6
          Ich denke das liegt daran, dass der Space einfach sehr groß ist, den der LoxBerry zur Verfügung hat. Dann löscht er keine Logfiles, weil er keine Not hat. Problem ist dann halt nur, dass die Database einfach sehr groß wird. Im Beispiel oben nur 2.2MB - das ist OK. Aber im alten Post waren es 77 MB (nur für die DB!) - das ist viel zu groß.

          Auf einem "echten LoxBerry" (also dem Ur-LB auf einem Raspberry) ist der Space für die Logfiles einfach sehr begrenzt (Ramdisk), da wurde die DB nie so groß. Auf einer VM ist das halt doch anders.

          Ist ein Issue, das wir uns ansehen müssen. https://github.com/mschlenstedt/Loxberry/issues/1497

          Weiß aber nicht wann wir mal wieder zur Pflege des LB kommen :-(
          Zuletzt geändert von Prof.Mobilux; 23.11.2025, 19:30.
          🇺🇦 Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine


          LoxBerry - Beyond the Limits

          Kommentar

          • Noschvie
            MS Profi
            • 24.09.2018
            • 659

            #7
            Habe nun mit dem folgenden Statement alle Log Files gelöscht, die älter als 5 Tage sind.

            Code:
            find . -maxdepth 1 -type f -name "*_Log Maintenance.log*" -mtime +5 -delete

            Kommentar

            • Noschvie
              MS Profi
              • 24.09.2018
              • 659

              #8
              Nach welchen Kriterien wird die Log DB "klein gehalten" ? Nachfolgend ein LB 3

              Code:
              [FONT=Courier New]loxberry@loxberry:~/log/system_tmpfs $ ls -lrt logs*
              -rw-r--r-- 1 loxberry loxberry    819200 Nov 24 12:58 logs_sqlite.dat-shm
              -rw-r--r-- 1 loxberry loxberry 421302992 Nov 24 12:58 logs_sqlite.dat-wal
              -rw-r--r-- 1 loxberry loxberry  47509504 Nov 24 12:58 logs_sqlite.dat[/FONT]

              Kommentar

              Lädt...