[plug] More bash - drive-age.sh

Bill Kenworthy billk at iinet.net.au
Wed May 10 20:44:34 AWST 2017


On 10/05/17 14:33, David Godfrey wrote:
> Hi Brad,
> 
> 
> On 09/05/17 11:05, Brad Campbell wrote:
>> On 09/05/17 01:12, David Godfrey wrote:
>>> Hi Brad,
>>>
>>> I've done up a pure bash (other than smartctl and sudo) version of this


Line 44 in your script is "for Dev in /dev/sd?? ; do"


rattus ~ # ls -al /dev/sd??
brw-rw---- 1 root disk 8, 65 Apr 30 17:59 /dev/sde1
brw-rw---- 1 root disk 8, 66 Apr 30 17:59 /dev/sde2
brw-rw---- 1 root disk 8, 67 Apr 30 17:59 /dev/sde3
rattus ~ # ls -al /dev/sd?
brw-rw---- 1 root disk 8,  0 Apr 30 17:59 /dev/sda
brw-rw---- 1 root disk 8, 16 Apr 30 17:59 /dev/sdb
brw-rw---- 1 root disk 8, 32 Apr 30 17:59 /dev/sdc
brw-rw---- 1 root disk 8, 48 Apr 30 17:59 /dev/sdd
brw-rw---- 1 root disk 8, 64 Apr 30 17:59 /dev/sde
brw-rw---- 1 root disk 8, 80 Apr 30 17:59 /dev/sdf
brw-rw---- 1 root disk 8, 96 Apr 30 17:59 /dev/sdg
rattus ~ #

deleting one question marks lets it work - no idea why the regex is
failing! (ran it under bash on gentoo)

/dev/sde - INTEL SSDSC2BW120H6            -  0 Years  89 Days 23 Hours -
Temperature (min/max) 18/79 Celsius
/dev/sdf - ST2000VN000-1HJ164             -  0 Years 297 Days  3 Hours -
Temperature (min/max) 17/37 Celsius
/dev/sdb - WDC WD20EFRX-68EUZN0           -  1 Years 228 Days  5 Hours -
Temperature (min/max) 2/41 Celsius
/dev/sdc - WDC WD20EFRX-68EUZN0           -  2 Years  12 Days 18 Hours -
Temperature (min/max) 2/41 Celsius
/dev/sdd - WDC WD20EFRX-68EUZN0           -  2 Years  22 Days 18 Hours -
Temperature (min/max) 16/43 Celsius
/dev/sda - INTEL SSDSC2CW120A3            - 104 Years 355 Days 10 Hours
- Temperature (min/max) 30/30 Celsius

Interesting results - the worlds oldest SSD as well as two drives
getting down to 2 deg c while running ...

BillK




More information about the plug mailing list