Skip to main content

smalk implementation for disk checking and monitoring.

Project description

smalk_disk_check

smalk implementation for disk checking and monitoring.

[!WARNING] This project has not been audited for security.

Installation

Install packages:

sudo apt update && sudo apt install util-linux mdadm smartmontools hddtemp hdparm  # Debian-like
# or
sudo pacman -Sy util-linux mdadm smartmontools hddtemp hdparm  # Arch

Install form pip:

python3 -m pip install --upgrade pip
pip3 install smalk_disk_check

Configuration and running

Copy settings_template.yaml as settings.yaml, change it as you need and run (read more about keys):

smalk_disk_check /path/to/settings.yaml

Run it with startup

Create script smalk_disk_check.sh (as root):

#!/bin/bash
SCRIPT_DIR_PATH=$(dirname "$0")
VENV_PATH="SCRIPT_DIR_PATH/venv"

if [ ! -d "$VENV_PATH" ]; then
    python3 -m venv "$VENV_PATH"

    . "$VENV_PATH/bin/activate"

    pip3 install --upgrade pip

    pip3 install smalk_disk_check
else
    . "$VENV_PATH/bin/activate"
fi

smalk_disk_check /path/to/settings.yaml

Then do it executable and set up crontab.

sudo chmod u+x /path/to/smalk_disk_check.sh

sudo crontab -e  # sudo pacman -S cronie or sudo apt install cronie 
                    # -> sudo systemctl start cronie && sudo systemctl enable cronie

# add to the end:
@reboot sleep 30 && /path/to/smalk_disk_check.sh

And reboot to test.

Or do it as systemd service.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smalk_disk_check-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smalk_disk_check-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file smalk_disk_check-0.1.0.tar.gz.

File metadata

  • Download URL: smalk_disk_check-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for smalk_disk_check-0.1.0.tar.gz
Algorithm Hash digest
SHA256 801dab25b1030861176d0f2cc51d6012f16eed5c637c5fd782a7671eb946fa93
MD5 d69efb5a99340aae1ba9240a1d1bedae
BLAKE2b-256 3bb6d826b44711f5a0e8b47b255cfef0854caa7ccee1ffc53c9a473e9d35a294

See more details on using hashes here.

File details

Details for the file smalk_disk_check-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for smalk_disk_check-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2bad88eead61e5ba49d17ca9e6d8f2052d3c83702ffe3459e884422f448080
MD5 9cdeeda14472439e031e4fa6eba9ba4d
BLAKE2b-256 3de7a4b9fc4aabe69f5249b82aac48f29d3599a6d8d70efa1cc4cc28761754e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page