Giter VIP home page Giter VIP logo

hdmon's Introduction

Hard Disk Monitor

Monitors hard disk activities and spins down idle disks.

Motivation

hd-idle is an excellent tool but it doesn't work well on my system that has several HDDs in USB enclosures. These enclosures apparently spin up disks almost immediately after they have been spun down. Not sure, but this is the most plausible explanation that I came up with. Another problem is that if a disk has been spun down by hd-idle it doesn't return its status anymore (for example to hdparm -C command). So smartd service doesn't get status of spun down disks and wakes them up. On the other hand I found that hdparm -y command spins down my disks without any issues, except that spun down and rotating disks have the same status ("standby").

Features

  • Monitors disk read/write activity.
  • Spins down idle disks.
  • Detects added/removed disks.
  • Allows to use well known tools like hdparm to spin down disks.
  • Doesn't rely on querying disk status.

Limitations

  • Does produce disk activities on system partition by writing messages to the system journal and executing shell commands. But it seems like everybody has system partitions on SSDs these days, so being completely "silent" might be not that important anymore.

TODO

  • Make "spin down" and "check up" functions generic.
  • Periodically run SMART diagnostic tool for active disks.
  • Experiment with different strategies to minimize number of spin up/spin down cycles.

Installation

sudo pip3 install git+https://github.com/sekogan/hdmon.git
sudo hdmon-install

Edit /etc/hdmon.yml to your preference.

sudo systemctl daemon-reload
sudo systemctl enable hdmon
sudo systemctl start hdmon

To uninstall:

sudo systemctl stop hdmon
sudo systemctl disable hdmon
sudo hdmon-uninstall
sudo pip3 uninstall hdmon
sudo rm /etc/hdmon.yml

Credits

Inspired by:

hdmon's People

Contributors

sekogan avatar

Watchers

 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.