Temat: SMART dysku w LuCI

wgrałem luci-app-disks-info z tąd https://github.com/gSpotx2f/luci-app-disks-info
gdzie zmienić parametr scsi na d-sat ?  chciałbym żeby w luci było wszystko pokazane o dysku jak u autora.

jeśli dam smartctl -a /dev/sda to mam bład odczytu :

root@ZyXEL-EX5601-T0:~# smartctl -a /dev/sda
smartctl 7.4 2023-08-01 r5530 [aarch64-linux-6.6.69] (localbuild)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Read NVMe Identify Controller failed: scsi error unsupported field in scsi command

ale już z parametrem d-sat smart już ładnie wszystko odczytał.

root@ZyXEL-EX5601-T0:~# smartctl -d sat -a  /dev/sda
smartctl 7.4 2023-08-01 r5530 [aarch64-linux-6.6.69] (localbuild)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG SSD PM871b M.2 2280 128GB
Serial Number:    
LU WWN Device Id: 
Firmware Version: MVT23D0Q
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      M.2
TRIM Command:     Available
Device is:        Not in smartctl database 7.3/5528
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jan 19 22:20:31 2025 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80)    Offline data collection activity
                    was never started.
                    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:              (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No 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:      (   2) minutes.
Extended self-test routine
recommended polling time:      (  64) minutes.
SCT capabilities:            (0x003d)    SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       1332
 12 Power_Cycle_Count       0x0033   098   098   000    Pre-fail  Always       -       1452
175 Program_Fail_Count_Chip 0x0033   100   100   010    Pre-fail  Always       -       0
176 Erase_Fail_Count_Chip   0x0033   100   100   010    Pre-fail  Always       -       0
177 Wear_Leveling_Count     0x0013   097   097   005    Pre-fail  Always       -       31
178 Used_Rsvd_Blk_Cnt_Chip  0x0013   100   100   010    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0013   100   100   010    Pre-fail  Always       -       316
181 Program_Fail_Cnt_Total  0x0033   100   100   010    Pre-fail  Always       -       0
182 Erase_Fail_Count_Total  0x0033   100   100   010    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       0
194 Temperature_Celsius     0x0033   072   051   000    Pre-fail  Always       -       28
195 Hardware_ECC_Recovered  0x001b   200   200   000    Pre-fail  Always       -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
238 Unknown_Attribute       0x0012   097   097   000    Old_age   Always       -       97
241 Total_LBAs_Written      0x0033   099   099   000    Pre-fail  Always       -       9831211382
242 Total_LBAs_Read         0x0033   099   099   000    Pre-fail  Always       -       10883459385

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      1288         -
# 2  Short offline       Completed without error       00%       820         -
# 3  Short offline       Aborted by host               90%       738         -
# 4  Offline             Completed without error       00%       738         -
# 5  Offline             Completed without error       00%       728         -
# 6  Short offline       Aborted by host               60%       728         -
# 7  Short offline       Completed without error       00%         1         -

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
  255        0    65535  Read_scanning was never started
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.

The above only provides legacy SMART information - try 'smartctl -x' for more

aktualnie tak to wygląda puste.
https://i.ibb.co/NKdYdy8/Zrzut-ekranu-19-1-2025-215722-192-168-1-2.jpg

2

Odp: SMART dysku w LuCI

W /usr/share/rpcd/acl.d/luci-app-disk-info.json oraz gdzieś jest view/disks-info.js - tam zmień.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: SMART dysku w LuCI

view/disks-info.js

    getDeviceData(device) {
        return Promise.all([
            device,
            L.resolveDefault(fs.exec('/usr/sbin/fdisk', [ '-l', device ]), null),
            L.resolveDefault(fs.exec_direct(
                '/usr/sbin/smartctl',
                [ '-iAHl', 'scttemp', '-l', 'error', '-l', 'devstat', '--json=c', device ],
                'json'), null),
        ]);
    },

/usr/share/rpcd/acl.d/luci-app-disk-info.json

{
    "luci-app-disks-info": {
        "description": "Grant access to disks-info procedures",
        "read": {
            "cgi-io": [ "exec" ],
            "file": {
                "/dev": [ "list" ],
                "/bin/df -Th /dev/*": [ "exec" ],
                "/usr/sbin/fdisk -l /dev/*": [ "exec" ],
                "/usr/sbin/smartctl -iAHl scttemp -l error -l devstat --json=c /dev/*": [ "exec" ],
                "/usr/sbin/smartctl -l scttempint,[0-9,p]* /dev/*": [ "exec" ]
            },
        }
    }
}
Używasz moich pakietów/obrazów z github?
Chcesz abym dalej je rozwijał i tworzył nowe?
Postaw kawę

4

Odp: SMART dysku w LuCI

nie widzę tego nigdzie view/disks-info.js
no i gdzie dać d-sat w tym /usr/share/rpcd/acl.d/luci-app-disk-info.json ?

5

Odp: SMART dysku w LuCI

Gdziekolwiek masz wołane smartctl to daj jako argument -d sat skoro to potrzebujesz. Analogicznie jak są podane inne argumenty do wywołania smartctl

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

6

Odp: SMART dysku w LuCI

ok dzięki będę próbował. zeby nie resetowac co chwile routera wystarczy dać  /etc/init.d/rpcd restart  zeby zmiany zapisało?

7

Odp: SMART dysku w LuCI

Powinno wystarczyć.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.