Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do smartctl for all attached devices?

Featured Replies

I'm looking for a combination of linux commands that will find all attached devices, call smartctl for each device and will output a file per device. To make it perfect the name of the file should include the current date and the device identification.

 

I tried the following command but I don't find the identification like "WDC_WD60EFRX-68L0BN1_WD-WX41D95PAC13":

 

lsblk -d -n -oNAME,RO,MODEL | grep sd

 

Any help is highly appreciated.

 

***EDIT:***

 

A little bit further now. Now I need to parse the output and create a smartctl call for every line giving a filename of the ID_SERIAL_SHORT as filename (with awk?):

 

for d in /dev/sd?; do echo "$d" "$(udevadm info --query=all --name=$d|grep ID_SERIAL_SHORT)"; done

 

  • Author

Ok, this one is ok for me:

 

for d in /dev/sd?; do echo "$d " "$(udevadm info --query=all --name=$d|grep ID_SERIAL_SHORT=)"|awk '{if ($1 !~ /\/dev\/sda/){system("smartctl -A "$1" > "$3".txt")}}'; done

Or you could try the "diagnostics" command!    ;)

 

In the diagnostics zip is a smart folder containing the SMART reports for all of your drives, correctly named with timestamps.

  • Author

Diagnostics command tried for the first time --> error. All smartreports do contain the following error:

 

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.9.7-unRAID] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

ERROR: smartctl takes ONE device name as the final command-line argument.
You have provided 2 device names:

/dev/sdf

Use smartctl -h to get a usage summary

 

 

Yeah, sorry!  It has always worked perfectly - except right now with the 6.3 upgrade!  A small bug in 6.3, will probably be fixed quickly.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.