Loading ...
Sorry, an error occurred while loading the content.

4393Re: Cool'n Quiet on LS2 MIPS

Expand Messages
  • prezet2005
    Nov 19, 2005
      I've been having a look at Cool&Quiet on the MIPSEL, I was/am getting the problem of
      getting C&Q to run properly because my drive wouldn't stay in standby mode for very long
      before Samba and 'kupdated' would ping the drive and spin it back up. Which renders
      C&Q useless because it's very rarely in standby mode.

      Due to this I've been working on a script which is called by cron every ten minutes that
      checks the disks spinning status, and/or temp and adjusts the fan speed accordingly. It's
      still a working project, but here's the script I'm using:

      #!/bin/sh

      # HD
      #
      MAX_TEMP=35
      DISKSLEEP="$(/sbin/hdparm -C /dev/hda | /bin/grep 'standby' -c)"

      # AVR
      #
      TTY="/dev/ttyS0"
      SLOW="\\\\"
      FAST="]]]]"


      # ... we need to be 'root'
      #
      if [ $UID -ne 0 ]; then
      echo "You need 'root' permissions for this script. Try 'sudo silence'."
      exit 1
      fi

      if [ "$DISKSLEEP" = 1 ]; then
      echo "${SLOW}" > $TTY
      else
      HD_TEMP=`smartctl -A /dev/hda | awk '/^194/ { print($10) }'`
      echo "Current HDD Temperature: $HD_TEMP"
      if [ $HD_TEMP -le $MAX_TEMP ]; then
      echo "${SLOW}" > $TTY
      else
      echo "${FAST}" > $TTY
      fi
      fi

      exit 0

      Basically, it checks if the HDD is in standby, if it is the fan speed is set to low. Else, it
      checks the HDD temperature, if the temp is over 35c it allows the fan to move to high, else
      sets it to low.

      I also found that if you access 'smartctl' to obtain thr hdd temp it spins the drive back up,
      so it useless to use when the drive is alseep, hence it is called late in the process.



      --- In LinkStation_General@yahoogroups.com, "p_g_varney" <p_g_varney@y...> wrote:
      >
      > The relevant process on LS2 is "mc_ctld". It seems to behave exactly
      > as "ppc_uartd" on LS1, although on my LS2 (Openlink 052b) the fan at
      > some point seems to start back up again after the script turns the fan
      > off, even though the disk hasn't start spinning again. To get around
      > this, I modified the script so that when it checks the fan status and
      > sees the fan speed is in theory already set to low, I echo the command
      > again to set it low just in case mc_ctld has set it high again.
      >
      > Also, regarding the logs, my LS2 with Openlink has all the logs on a
      > ramdisk that gets backed up and restored to the HDD on
      > startup/shutdown and once a day during the log rotate cron job, thus
      > avoiding spinning up and shutting down the disk just to update the logs.
      >
      > Paul
      >
      > --- In LinkStation_General@yahoogroups.com, "andy_jf_alexanderuk"
      > <andrew.alexander@i...> wrote:
      > >
      > > Hi,
      > >
      > > Has there been any more progress (or help needed) on getting this
      > > working with the LS2.
      > >
      > > My fan is beginning to make my LS sound more like a jet engine than
      > > a 'discrete' storage device.
      > >
      > > If any more info is needed, am more than happy to supply
      > >
      > > Thanks
      > >
      > > Andy
      > >
      >
      > [Snip]
      >
      > > > --- In LinkStation_General@yahoogroups.com, "Frenchy "
      > > > <glasseron@y...> wrote:
      > > > >
      > > > > To owners of noisy LS2's, (the Linstation fans have a short life)
      > > > >
      > > > > As the father of the CnQ script, if you want me to make try and
      > > > make
      > > > > it work on LS2 I need the exact name string of the UART daemon
      > > > > process on LS2 called "ppc_uartd" on LS1. Know that there is a
      > > > > condition when this process is stopped and I need it to run. So
      > > I
      > > > > always make sure it is running before handling any status change.
      > > > >
      > > > > I read the entire page below all the way down, no trace of UARTD
      > > > > there. INSTEAD OPEN A TELNET ON YOUR LS2 AND TYPE THIS: ps -ef
      > > > > Then post a reply with the output or whatever is the UARTD name
      > > > > string.
      > > > >
      > > > > It boils down to test on LS2 you can try to bypass my script
      > > > > manipulations of UARTD, then refresh my memory about why it is
      > > > > required. It won't wipe out your disk instantly but I
      > > > > *sort*of*recall* that daily cron log rotation around 4am stops
      > > the
      > > > > UARTD and without it the fan speed is stuck in watever status it
      > > > was
      > > > > before UARTD stop (thus explaining why I always check on it and
      > > > > restard it when needed) - Well if I had an LS2 handy I could
      > > > figure
      > > > > this out.
      > > > >
      > > > > I have an enhancement up my sleeve to redirect log outputs to an
      > > > > external USB key so the HDD does not get spun only to dump 2
      > > lines
      > > > > at the bottom of a log file. I see that happening about every 3
      > > > > hours where instead my disk could sleep non-stop unless the
      > > > network
      > > > > needs it.
      > > > > Sam.
      > > > >
      >
      > [Snip]
      >
    • Show all 21 messages in this topic