Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Proxmox
    5. ERL: Cron-Daemon-Mails von PVE bzgl. smartctl

    NEWS

    • Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    ERL: Cron-Daemon-Mails von PVE bzgl. smartctl

    This topic has been deleted. Only users with topic management privileges can see it.
    • MartinP
      MartinP last edited by MartinP

      Seit neuestem kommen bei mir Mails durch, die ich bisher nicht kannte.

      Ein Cron-Job, der im Hypervisor ausgeführt wird, und die Festplatten testen soll schmeißt jetzt Mails aus, weil eine der Festplatten bei den smartctl Queries etwas zickt ...
      Returncode 4

      Bit 2:

      Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).

      Scheint bei der USB-HDD so zu sein, dass die da bei einigen Parametern zickt, ansonsten sehen die Health-Parameter alle ok aus ...

      Mails werden seit 17.10 04:11 für jeden Cron-Durchlauf generiert ....
      Entweder hat sich bei einem Proxmox-Update der Mailer von selber eingeschaltet, oder ein Spam-Filter meines Mail-Kontos ist nicht mehr so scharf wie früher ...

      Habe jetzt erstmal den Mailversand abgestellt (Strich statt Haken im untenstehenden Screenshot)
      b9455081-f91c-410a-b4f2-0f404d4e1806-image.png

      Mails sahen so aus ...

      X-Account-Key: account3
      X-UIDL: cfd3000001000000
      X-Mozilla-Status: 0001
      X-Mozilla-Status2: 00000000
      X-Mozilla-Keys:
      X-Spam-Flag: NO
      X-Envelope-From: root@pve.fritz.box
      DMARC-Filter: OpenDMARC Filter v1.4.2 mail189c50.megamailservers.eu 59NAB8Gd653923
      Authentication-Results: mail189c50.megamailservers.eu; dmarc=none (p=none dis=none) header.from=pve.fritz.box
      Authentication-Results: mail189c50.megamailservers.eu; spf=none smtp.mailfrom=pve.fritz.box
      Return-Path: root@pve.fritz.box
      Received: from pve.fritz.box ...........................
      by mail189c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 59NAB8Gd653923
      for <...............>; Thu, 23 Oct 2025 10:11:11 +0000
      Received: by pve.fritz.box (Postfix, from userid 65534)
      id F3BA35C14E1; Thu, 23 Oct 2025 12:11:07 +0200 (CEST)
      X-Original-To: root
      Delivered-To: root@pve.fritz.box
      Received: by pve.fritz.box (Postfix, from userid 0)
      id DB5BE5C14DE; Thu, 23 Oct 2025 12:11:07 +0200 (CEST)
      From: root@pve.fritz.box (Cron Daemon)
      To: root@pve.fritz.box
      Subject: Cron root@pve bash /root/scripte/Proxmox_Skripte/check_usb_hdd.sh 2>&1 /dev/null
      MIME-Version: 1.0
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-Cron-Env: <SHELL=/bin/sh>
      X-Cron-Env: <HOME=/root>
      X-Cron-Env: <PATH=/usr/bin:/bin>
      X-Cron-Env: <LOGNAME=root>
      Message-Id: 20251023101107.DB5BE5C14DE@pve.fritz.box
      Date: Thu, 23 Oct 2025 12:11:07 +0200 (CEST)
      X-VADE-SPAMSTATE: clean
      X-VADE-SPAMSCORE: 15
      X-VADE-SPAMCAUSE: dmFkZTGd9Ip0ncXUTQGNoac/LjEDbRjakx+5ffAZtPPQE4KlxCX5YjMnz1nqrQhZ1PZE4oN7HHnTFZ1ao1UcrFpn2EDy48cY2IwoL3avhrq2dWTx0n2G6jmWKQEJzHYBDofeUJMLykuOSzVo1RUGeXWhI2NhizEkxX7vsG6egBy7Q/pnZtfjw7ukkjdefnNUq9fRNbFFU335taIsdQK4UiNWnQ5zcEhtR7ld3aiF6aXGyyKYroz2kAWL8NyItwM9Kjw1VHjDki1MpP6fWkwCg/ByVKdFMl2/UgdPBaEuAaNNebLDRy524vY2cnCkJrc+3Me1Hi0/a3EJUyU+IW5YLNtMhsUSWBER3mtOP6xAai8Q154bhydavwjVDf2YCNIpcFZTeERmSrlZUID7nf8GGa+XRZ1XeKgou2F+/P5AwILzNeLKvd5tgiiM11yNYqhdB7s/uUOL3zn9oJvSu1Dp3fjkJVeOiHG+DGDHJ4QOdZyK6bV80DOzwndLY6OoFk45E6TmpIMqCUO3hCx6mQ3C8lp9WsPo81gCITJ77MpxiGIh5+YOTAEv/3EJ2cJvul7Jlh1Qa4+Zmo1BsvpdiSZPRWtF4MiJJeGsG3BbVxh9Y40G9XOgcmLMSj79G58XUcfODm3ZuYiUJbRdTet6jb0oquh+LVRda+IqffvjC1/y51zVZlryJA
      X-Rspamd-Status: No, score=3.50
      X-Rspamd-Result: default: False [3.50 / 6.00];
      HFILTER_HOSTNAME_4(2.50)[ip-176-199-046-006.um44.pools.vodafone-ip.de];
      AUTH_NA(1.00)[];
      RCVD_NO_TLS_LAST(0.10)[];
      MIME_GOOD(-0.10)[text/plain];
      ASN(0.00)[asn:3209, ipnet:176.199.0.0/16, country:DE];
      FROM_NO_DN(0.00)[];
      MIME_TRACE(0.00)[0:+];
      RCPT_COUNT_ONE(0.00)[1];
      ARC_NA(0.00)[];
      MID_RHS_MATCH_FROM(0.00)[];
      R_DKIM_NA(0.00)[];
      DMARC_NA(0.00)[fritz.box];
      RCVD_COUNT_TWO(0.00)[2];
      TO_EQ_FROM(0.00)[];
      FROM_EQ_ENVFROM(0.00)[];
      MISSING_XM_UA(0.00)[];
      TO_DN_NONE(0.00)[];
      R_SPF_NA(0.00)[no SPF record]
      X-Origin-Country: DE
      X-Origin-ASN: 3209
      X-WHL: LR

      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 92 100 92 0 0 8195 0 --:--:-- --:--:-- --:--:-- 8363
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.NormalizedReadErrorRate","value":79,"val":79} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 97 100 97 0 0 12070 0 --:--:-- --:--:-- --:--:-- 13857
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.NormalizedReadErrorRateWorst","value":62,"val":62} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 95 100 95 0 0 10500 0 --:--:-- --:--:-- --:--:-- 11875
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.NormalizedReadErrorRateLimit","value":6,"val":6} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 82 100 82 0 0 8647 0 --:--:-- --:--:-- --:--:-- 9111
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.SeekErrorRate","value":87,"val":87} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 87 100 87 0 0 10410 0 --:--:-- --:--:-- --:--:-- 10875
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.SeekErrorRateWorst","value":60,"val":60} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 87 100 87 0 0 11158 0 --:--:-- --:--:-- --:--:-- 12428
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.SeekErrorRateLimit","value":30,"val":30} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 82 100 82 0 0 10553 0 --:--:-- --:--:-- --:--:-- 11714
      {"id":"0_userdata.0.Proxmox_N3000.HDD_Intenso1.LastSmartResult","value":4,"val":4} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 92 100 92 0 0 7469 0 --:--:-- --:--:-- --:--:-- 7666
      {"id":"0_userdata.0.Proxmox_N3000.System_SSD.NormalizedReadErrorRate","value":100,"val":100} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 97 100 97 0 0 12224 0 --:--:-- --:--:-- --:--:-- 12125 100 97 100 97 0 0 11868 0 --:--:-- --:--:-- --:--:-- 10777
      {"id":"0_userdata.0.Proxmox_N3000.System_SSD.NormalizedReadErrorRateWorst","value":100,"val":100} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 93 100 93 0 0 7617 0 --:--:-- --:--:-- --:--:-- 7750
      {"id":"0_userdata.0.Proxmox_N3000.System_SSD.NormalizedReadErrorRateLimit","value":0,"val":0} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 88 100 88 0 0 9135 0 --:--:-- --:--:-- --:--:-- 9777
      {"id":"0_userdata.0.Proxmox_N3000.System_SSD.PercentLifetimeRemain","value":90,"val":90} % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 80 100 80 0 0 4930 0 --:--:-- --:--:-- --:--:-- 5000
      {"id":"0_userdata.0.Proxmox_N3000.System_SSD.LastSmartResult","value":0,"val":0}

      Cron Eintrag dazu

      11 */4 * * * bash /root/scripte/Proxmox_Skripte/check_usb_hdd.sh 2>&1 /dev/null
      

      Muss mal schauen, dass ich feiner granuliert nur von diesem Script keine Alarm-Mail bekomme... bin mir nicht sicher, ob ich bei den Umleitungen bei dem Crontab Eintrag alles richtig gemacht habe...

      MartinP 1 Reply Last reply Reply Quote 0
      • MartinP
        MartinP @MartinP last edited by MartinP

        @martinp Ergänzung - Hier die smartctl-Ausgabe

        Obige Mail ist Jsonifiziert, um das Ergebnis besser mit Influx verarbeiten zu können.
        EDIT: In der vorigen Version die SSD erwischt

        smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-15-pve] (local build)
        Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
        
        === START OF INFORMATION SECTION ===
        Model Family:     Seagate BarraCuda 3.5 (SMR)
        Device Model:     ST4000DM004-2CV104
        Serial Number:    Z9703MW4
        LU WWN Device Id: 5 000c50 0a28fd89c
        Firmware Version: 0001
        User Capacity:    4,000,787,030,016 bytes [4.00 TB]
        Sector Sizes:     512 bytes logical, 4096 bytes physical
        Rotation Rate:    5425 rpm
        Device is:        In smartctl database 7.3/5319
        ATA Version is:   ACS-3 T13/2161-D revision 5
        SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
        Local Time is:    Thu Oct 23 13:35:58 2025 CEST
        SMART support is: Available - device has SMART capability.
        SMART support is: Enabled
        
        === START OF READ SMART DATA SECTION ===
        SMART Status command failed: scsi error unsupported scsi opcode
        SMART overall-health self-assessment test result: PASSED
        Warning: This result is based on an Attribute check.
        
        General SMART Values:
        Offline data collection status:  (0x82) Offline data collection activity
                                                was completed without error.
                                                Auto Offline Data Collection: Enabled.
        Self-test execution status:      (   0) The previous self-test routine completed
                                                without error or no self-test has ever 
                                                been run.
        Total time to complete Offline 
        data collection:                (    0) seconds.
        Offline data collection
        capabilities:                    (0x7b) SMART execute Offline immediate.
                                                Auto Offline data collection on/off support.
                                                Suspend Offline collection upon new
                                                command.
                                                Offline surface scan supported.
                                                Self-test supported.
                                                Conveyance Self-test supported.
                                                Selective Self-test supported.
        SMART capabilities:            (0x0003) Saves SMART data before entering
                                                power-saving mode.
                                                Supports SMART auto save timer.
        Error logging capability:        (0x01) Error logging supported.
                                                General Purpose Logging supported.
        Short self-test routine 
        recommended polling time:        (   1) minutes.
        Extended self-test routine
        recommended polling time:        ( 478) minutes.
        Conveyance self-test routine
        recommended polling time:        (   2) minutes.
        SCT capabilities:              (0x30a5) SCT Status supported.
                                                SCT Data Table supported.
        
        SMART Attributes Data Structure revision number: 10
        Vendor Specific SMART Attributes with Thresholds:
        ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
          1 Raw_Read_Error_Rate     0x000f   079   062   006    Pre-fail  Always       -       81140992
          3 Spin_Up_Time            0x0003   096   096   000    Pre-fail  Always       -       0
          4 Start_Stop_Count        0x0032   037   037   020    Old_age   Always       -       65535
          5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
          7 Seek_Error_Rate         0x000f   087   060   030    Pre-fail  Always       -       503426318
          9 Power_On_Hours          0x0032   028   028   000    Old_age   Always       -       63505h+51m+29.298s
         10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
         12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29
        183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
        184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
        187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
        188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       1 1 1
        189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
        190 Airflow_Temperature_Cel 0x0022   072   049   040    Old_age   Always       -       28 (Min/Max 24/42)
        191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
        192 Power-Off_Retract_Count 0x0032   099   099   000    Old_age   Always       -       2562
        193 Load_Cycle_Count        0x0032   004   004   000    Old_age   Always       -       193342
        194 Temperature_Celsius     0x0022   028   051   000    Old_age   Always       -       28 (0 18 0 0 0)
        195 Hardware_ECC_Recovered  0x001a   079   064   000    Old_age   Always       -       81140992
        197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       48
        198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       48
        199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
        240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       18429h+04m+15.967s
        241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       16731442768
        242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       13243482656
        
        SMART Error Log Version: 1
        No Errors Logged
        
        SMART Self-test log structure revision number 1
        No self-tests have been logged.  [To run self-tests, use: smartctl -t]
        
        SMART Selective self-test log data structure revision number 1
         SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
            1        0        0  Not_testing
            2        0        0  Not_testing
            3        0        0  Not_testing
            4        0        0  Not_testing
            5        0        0  Not_testing
        Selective self-test flags (0x0):
          After scanning selected spans, do NOT read-scan remainder of disk.
        If Selective self-test is pending on power-up, resume after 0 minute delay.
        
        result: 4  p2  0
        OK(4): test_hdd_data.sh drive health check data of system ssd retrieved
        
        MartinP 1 Reply Last reply Reply Quote 0
        • MartinP
          MartinP @MartinP last edited by MartinP

          @martinp hab mal den cronjob umgebaut

          11 */4 * * * bash /root/scripte/Proxmox_Skripte/check_usb_hdd.sh 1> dev/null 2> /dev/null
          

          Alles umgeleitet nach /dev/null, aber ob das den Returncode auch entschärft

          EDIT Scheint geholfen zu haben, habe den Haken bei "Notifications / mail-to-root" wieder aktiviert, und bisher keine mails...

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate

          718
          Online

          32.3k
          Users

          81.1k
          Topics

          1.3m
          Posts

          1
          3
          97
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo