norefs, disk: fix spindown value setting
This commit is contained in:
parent
0501e1461e
commit
10f723780a
2 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,6 @@ import base
|
|||
from decorators import *
|
||||
import tuned.logs
|
||||
import tuned.utils.commands
|
||||
|
||||
import os
|
||||
|
||||
log = tuned.logs.get()
|
||||
|
|
@ -191,12 +190,12 @@ class DiskPlugin(base.Plugin):
|
|||
|
||||
@command_set("spindown", per_device=True)
|
||||
def _set_spindown(self, value, device):
|
||||
pass
|
||||
tuned.utils.commands.execute(["hdparm", "-S", value, "/dev/" + device])
|
||||
|
||||
@command_get("spindown")
|
||||
def _get_spindown(self, device):
|
||||
# TODO: ticket #23, There's no way how to get current/old spindown value.
|
||||
tuned.utils.commands.execute(["hdparm", "-S", value, "/dev/" + device])
|
||||
pass
|
||||
|
||||
def _readahead_file(self, device):
|
||||
return os.path.join("/sys/block/", device, "queue/read_ahead_kb")
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ def read_file(f):
|
|||
|
||||
|
||||
def execute(args):
|
||||
log.debug("Executing %s." % str(args))
|
||||
out = ""
|
||||
try:
|
||||
proc = Popen(args, stdout=PIPE, stderr=PIPE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue