GithubHelp home page GithubHelp logo

lortordermur / spinmedown Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 6 KB

Simple script for timed spindown of disk drives

License: The Unlicense

Shell 100.00%
hdparm power-management disk-drives sysfs spindown idle

spinmedown's Introduction

spinmedown โ€“ Simple script for timed spindown of disk drives

Summary

spinmedown is a script that can be called repeatedly to check whether a disk drive has been accessed in the meantime, and to spin it down if it has not. This is useful for USB drives that do not enter standby/power-saving mode automatically.

The script should be able to run fine on most Unix/Linux shells and requires hdparm[1] as its only dependency. It also requires sysfs, and therefore an operating system based on the Linux kernel.

Installation

Copy the spinmedown script to somewhere in your path, like ~/bin. Symlinking works too.

Usage

spinmedown fsuuid

fsuuid is a valid filesystem UUID. Use the blkid command for a list of active mounts. Then call the script in a regular interval corresponding to the desired disk drive timeout.

Crontab example

# Spin down USB HD if idle for 30 minutes
*/30 * * * * root spinmedown 01234567-89ab-cdef-0123-456789abcdef

If using /etc/cron.d, make sure to set up the PATH correctly in the file, and that it is chowned to root.

spinmedown's People

Contributors

lortordermur avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.