/[svn.andrew.net.au]/usbspindownd/usbspindownd.py
ViewVC logotype

Diff of /usbspindownd/usbspindownd.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 38 by apollock, Fri Feb 1 04:01:43 2008 UTC revision 39 by apollock, Sat Feb 2 18:16:36 2008 UTC
# Line 168  def monitor_disks(config, options): Line 168  def monitor_disks(config, options):
168              # This disk is ineligible for spinning down at this time              # This disk is ineligible for spinning down at this time
169              debug(options, "Disk idle for %s seconds, but not for long enough (%s)" % (now - config[disk]["timestamp"], config[disk]["wait"]))              debug(options, "Disk idle for %s seconds, but not for long enough (%s)" % (now - config[disk]["timestamp"], config[disk]["wait"]))
170          else:          else:
171              debug(options, "Disk not idle (old msio: %s, current msio: %s)" % (config[disk]["last_msio"], msio))
172            config[disk]["last_msio"] = msio            config[disk]["last_msio"] = msio
173            config[disk]["timestamp"] = int(time.time())            config[disk]["timestamp"] = int(time.time())
174            if config[disk]["spun_down"]:            if config[disk]["spun_down"]:
175              debug(options, "%s presumed spun back up by activity" % (disk))              debug(options, "%s presumed spun back up by activity" % (disk))
176              config[disk]["spun_down"] = False              config[disk]["spun_down"] = False
           debug(options, "Disk not idle (old msio: %s, current msio: %s)" % (config[disk]["last_msio"], msio))  
177      debug(options, "Sleeping")      debug(options, "Sleeping")
178      time.sleep(60)      time.sleep(60)
179    debug(options, "Shutting down")    debug(options, "Shutting down")

Legend:
Removed from v.38  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.22