× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Generate HDD reports?

eton
Luminary

Generate HDD reports?

How can I generate HDD reports of the type shown in this post?

Without downloading all logs within Frontview. Tried that and got a 340 MB large file with all kinds of stuff. I just want to view my HDDs health in as good detail as possible.

And what are those reports called?
Message 1 of 13
RX
Luminary
Luminary

Re: Generate HDD reports?

In Frontview, go to Status>Health then click on the Smart+ button to view the status of each drive.
Message 2 of 13
Nhellie
Virtuoso

Re: Generate HDD reports?

eton wrote:
How can I generate HDD reports of the type shown in this post?

Without downloading all logs within Frontview. Tried that and got a 340 MB large file with all kinds of stuff. I just want to view my HDDs health in as good detail as possible.

And what are those reports called?


I have not seen an app to DL only HDD logs, probably it can be done through SSH but that will be much hassle (specially if you are not familiar with it). My advice is to enable your email alerts (System>Alerts) and on System>Alerts>Settings only select the ones that are concerned with HDD (if you only want status of the HDD) .
Message 3 of 13
eton
Luminary

Re: Generate HDD reports?

Nhellie wrote:
I have not seen an app to DL only HDD logs, probably it can be done through SSH but that will be much hassle (specially if you are not familiar with it). My advice is to enable your email alerts (System>Alerts) and on System>Alerts>Settings only select the ones that are concerned with HDD (if you only want status of the HDD) .

I actually prefer SSH and CLI, check my other posts. So I would be very happy if anyone who knows the SSH commands to generate those reports is willing to share them here. 😄
Message 4 of 13
Danthem
NETGEAR Employee

Re: Generate HDD reports?

A quick one to get current information is this one:
for i in {a..z}; do smartctl -a /dev/sd${i} | egrep -i "Device Model|Serial Number|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done 


It won't go through history though, just show current status of each disk. Not sure if it's quite what you're looking for?

edit: sent you a pm on how to generate the raw data of the smart_history.log
Message 5 of 13
eton
Luminary

Re: Generate HDD reports?

Danthem wrote:
A quick one to get current information is this one:
for i in {a..z}; do smartctl -a /dev/sd${i} | egrep -i "Device Model|Serial Number|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done 

It won't go through history though, just show current status of each disk. Not sure if it's quite what you're looking for?

Thanks @Danthem!!
That was some exotic bash script. Will it work on a Sparc machine?
Message 6 of 13
mdgm-ntgr
NETGEAR Employee Retired

Re: Generate HDD reports?

You would need to change it to /dev/hd${i}

You can try it. If it doesn't work it would only require a further small modification or two to work on Sparc.
Message 7 of 13
eton
Luminary

Re: Generate HDD reports?

I changed the script, but it didn't output anything.
for i in {a..z}; do smartctl -a /dev/hd${i} | egrep -i "Device Model|Serial Number|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done


My HDD devices are /dev/hdc and /dev/hde. And "smartctl -a /dev/hde" worked. I guess the egrep doesn't match the script above.
# smartctl -a /dev/hde
smartctl 5.42 2011-10-20 r3458 [padre-linux-2.6.17.14ReadyNAS] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family: Hitachi Deskstar 5K3000
Device Model: Hitachi HDS5C3020ALA632
Serial Number: ML0230FA17AEJD
LU WWN Device Id: 5 000cca 36ad17184
Firmware Version: ML6OAA10
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Tue May 26 21:33:56 2015 CEST
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: (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: ( 28) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 255) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 134 134 054 Pre-fail Offline - 100
3 Spin_Up_Time 0x0007 142 142 024 Pre-fail Always - 406 (Average 368)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 14
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 144 144 020 Pre-fail Offline - 30
9 Power_On_Hours 0x0012 098 098 000 Old_age Always - 20500
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 14
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 854
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 854
194 Temperature_Celsius 0x0002 193 193 000 Old_age Always - 31 (Min/Max 24/41)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0

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% 5 -

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.
Message 8 of 13
Danthem
NETGEAR Employee

Re: Generate HDD reports?

Sent it to Eton in PM but might as well post it here as well, for Sparc - go for something like this instead:
for i in a b c d e f h i j k; do smartctl -a /dev/hd${i} | egrep -i "Device Model|Serial Number|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done
Message 9 of 13
eton
Luminary

Re: Generate HDD reports?

Danthem wrote:
Sent it to Eton in PM but might as well post it here as well, for Sparc - go for something like this instead:
for i in a b c d e f h i j k; do smartctl -a /dev/hd${i} | egrep -i "Device Model|Serial Number|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done

Thanks! That one works. It's only missing the table headline row (ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE).

And yes the problem was that step values used in Danthem's first script are not supported until Bash version 4. But it might be doable with seq and awk etc.

# echo $BASH_VERSION
2.05b.0(1)-release
Message 10 of 13
eton
Luminary

Re: Generate HDD reports?

Made a simple fix to include the headline row:
for i in a b c d e f h i j k; do smartctl -a /dev/hd${i} | egrep -i "Device Model|Serial Number|ATTRIBUTE_NAME|Reallocated_sec|ATA Er|offline_uncorrect|current_pending_sector|Power_on";done
Message 11 of 13
mdgm-ntgr
NETGEAR Employee Retired

Re: Generate HDD reports?

Btw the one should in the post linked to by the opening post in this thread is for OS6 not for your Duo.

You can generate that table (OS6 only) using

# sqlite3 -header -column -cmd '.width 20 20' /var/readynasd/smart.sq3 'select *,datetime(timestamp, "unixepoch") as time from smart_history;'


The nice thing about the smart history table is that it shows the history of key changes to SMART error counts.

On older models such as yours we have some disk_smart logs under /var/log/frontview. You can get some SMART history by comparing those logs.
Message 12 of 13
eton
Luminary

Re: Generate HDD reports?

mdgm wrote:
Btw the one should in the post linked to by the opening post in this thread is for OS6 not for your Duo.

You can generate that table (OS6 only) using

# sqlite3 -header -column -cmd '.width 20 20' /var/readynasd/smart.sq3 'select *,datetime(timestamp, "unixepoch") as time from smart_history;'

The nice thing about the smart history table is that it shows the history of key changes to SMART error counts.
On older models such as yours we have some disk_smart logs under /var/log/frontview. You can get some SMART history by comparing those logs.

Thanks mdgm!
Yes, there are a lot of logs in /var/log/frontview. In addition to disk_smart_ there are also ecounter_and smart_errors and more logs.
Message 13 of 13
Top Contributors
Discussion stats
  • 12 replies
  • 2391 views
  • 0 kudos
  • 5 in conversation
Announcements