12

Is there a way for me to see if my hard drive is actually spinning or in sleep mode under Windows 7?
I am looking for answers for both internal and external hard drives; they don't always have a light to indicate their status.

  • External drive : regard the status light. Internal drives will all sleep together, so no utility can be executed. More details are needed for a more meaningful answer. – harrymc Mar 13 '12 at 14:19
  • I have both, internal and external drives. The enclosures I got doesn't have light showing sleep mode. I thought question is very simple and I know how to do it in Linux, but couldn't find software for Win. – Pablo Mar 13 '12 at 14:22
  • This question does have some logical issues, in general, you need to load the application to check the hard drive, which spin your hard drive. You end up having the hard drive spin whenever you perform the check. What you actually need is some tools, which stay in memory, a window gadget or probably a tray icon, which continue monitor your disks should work. – user218473 Sep 13 '13 at 15:22
  • Here is the link: after Microsoft have removed the sidebar platform... they want you buy window 8 ... :).....pcsupport.about.com/od/windowsvista/tp/vistagadgetssu.01.htm – user218473 Sep 13 '13 at 15:24
5

The smartctl command-line utility of smartmontools offers exactly this functionality with the -n switch. From the man page:

-n POWERMODE, --nocheck=POWERMODE
[ATA only] Specifies if smartctl should exit before performing any checks when the device is in a low-power mode. It may be used to prevent a disk from being spun-up by smartctl.

It works from a non-elevated terminal even as the only option argument, which makes its use pretty straightforward for internal drives:

> smartctl.exe -n standby d:
smartctl 6.5 2016-05-07 r4318 [x86_64-w64-mingw32-win10] (sf-6.5-1)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

d:: Device is in STANDBY (OS) mode, exit(2)

whereas a spinning drive reports Device is in ACTIVE or IDLE mode

External drives and/or exotic controllers might be more tricky and require you to read up on the -d switch.

4
+50

You could run DiskMon which would show all activity on each drive in your system. No entries would suggest that the disk is in sleep mode.

Limited testing here confirms that this would appear to be the case anyway. When trying to access a drive that isn't being listed in the current transactions, there is a delay before the drive shows up in the DiskMon window indicating that it has been spun down.

It's a bit crude I admit!

3

It's an inelegant solution, but try installing the windows version of hdparm. Then run hdparm.exe -C [drivename] from the directory it installed to (usually Program Files (x86) or the like). Using this method, I was able to tell whether my drives were active/idle, or in standby (sleeping and not spinning).

The drive name is a UNIX style device address which is mapped somehow to a Windows drive letter/physical device (/dev/hda is usually your primary drive, and then /dev/hdb and so on), but I'm not sure how to determine what UNIX device aliases are available under windows. You can make sure that a given /dev/hd_ alias corresponds to the correct drive by running hdparm.exe -i [drivename] on the alias, and checking the output to see if the drive parameters match up with what you expect.

It would be nice if there was a graphical and/or native-windows utility to get at this functionality, but I don't know of one.

It's still UNIX-ish, but you could also try playing around with the Windows version of smartmontools, and see if it offers similar functionality in a more usable package. I don't have any experience with that software, though.

  • 4
    smartmontools uses S.M.A.R.T. - but any usage of S.M.A.R.T. on a sleeping drive will wake it up. A case of Catch-22. – harrymc Mar 13 '12 at 16:51
1

You could use a PowerShell script to get the status of disk drives for which this information is available (not all drives give back this status).

Try this in a Windows PowerShell console (probably run as administrator) :

Get-WMIObject -class Win32_DiskDrive | Select-Object caption,availability

The interesting values for availability can be found here :

3 (0x3) : Running or Full Power
7 (0x7) : Power Off
8 (0x8) : Off Line
13 (0xD) : Power Save - Unknown
14 (0xE) : Power Save - Low Power Mode
15 (0xF) : Power Save - Standby
16 (0x10) : Power Cycle
17 (0x11) : Power Save - Warning

If Win32_DiskDrive does not work for you, other possibilities are Win32_LogicalDisk and Win32_Volume.

If any one of them works, you could also create a script, for example :

$strComputer = "."
$colItems = get-wmiobject -class "Win32_Volume" -namespace "root\cimv2" -computername strComputer
foreach ($objItem in $colItems) {
      write-host "Name: " $objItem.Name " Availability: " $objItem.Availability
}
  • 6
    You should have commented here that the availability attribute is always displayed as empty - I think it's probably not implemented by Microsoft. The problem with all the disk-status utilities I was able to find is that they use S.M.A.R.T. which will wake up a sleeping drive, so this is a real conundrum. I think you should contact Microsoft to complain about the availability attribute not working. – harrymc Sep 11 '13 at 18:36
  • I just tried it on a WS2008 R2 with Powershell 2 and I also get an empty value for Availability – AFract Feb 26 '17 at 11:18
0

Fail save method: with your ear layed on the drive or the place on the laptop where there drive sits, trigger a drive access. With any mechanical disk, you should clearly hear a spin-up sound if the drive has been in sleep mode.

  • The goal is probably more to know if/when a HDD is in Sleep mode rather than wake it up... – AFract Feb 26 '17 at 11:19
0

You could use Uwe Siebers nice freeware FFB - Flush File Buffers.

FFB is a commandline tool which flushes the write cache of one or more storage volumes.

...

Sleeping drives are skipped unless -f is given.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.