[smartmontools-support] smartctl and standby mode

Alfred Ganz alfred-ganz+smartm at agci.com
Mon Jun 17 03:25:37 CEST 2019


Ladies and Gentlemen,

I have a question about the interaction of smartctl with a disk that is 
configured to go into standby mode after a certain interval of inactive
state. I would like to run a script which uses smartctl to send the 
real temperature for some disks from ID=194 of the Vendor Specific 
SMART Attributes to a GUI. smartctl is used with -n standby and with the 
proper -d option. When the disk is in standby mode smartctl will tell 
the script that the disk is not active and the script does what I want 
it to do.

My problem arises when I would like to run the script at an interval
that is shorter than the countdown interval of the disk while the disk
is otherwise inactive. In this case the smartctl calls keep the disk 
active forever even if there is no other activity. I presume this is 
because smartctl calls are considered an activating action for the disk.

My question is, am I stuck with this or is there a trick by which the 
script could get the temperature while the disk is in the standby delay 
countdown phase without breaking the countdown or is there some other way 
for the script to detect that the disk is in the standby delay countdown 
phase? I have tried smartctl with -n idle as well as -n standby and I 
have tried setting some disk options with hdparm but had no luck. 

I understand that this may require something outside of smartctl, but
someone on this list might still have some hint. I am currently using a 
hack to inhibit using smartctl while nothing from the disk in question 
is mounted which happens to cover most current use cases. However, the 
disk can also go into standby mode while partitions are mounted, and 
it would be nice to see the disk temperature while the disk is in the 
standby delay countdown phase.

Any advice would be appreciated, Thanks, AG

P.S. The time for the long selftest for this disk is much longer than
	the standby delay time, it therefore requires a script to
	inhibit the disk from going into standby mode during the test.

-- 
 ----------------------------------------------------------------------
   Alfred Ganz					alfred-ganz:at:agci.com
   AG Consulting				(203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------



More information about the Smartmontools-support mailing list