Extensive disk monitor for Linux OS
Project description
PyUdisk
PyUdisk is a python module to generate S.M.A.R.T metrics for all drives/partitions on a host machine.
Installation
Recommendations
- Install
python[3.10] or [3.11] - Use a dedicated [virtual environment]
For monitoring and reporting, use
pip install PyUdisk[standard]
For basic functionality, use
pip install PyUdisk
Usage
IDE
import pyudisk
if __name__ == '__main__':
for metric in pyudisk.smart_metrics():
print(metric)
CLI
pyudisk start
Use
pyudisk --helpfor usage instructions.
Environment Variables
Sourcing environment variables from an env file
By default,
PyUdiskwill look for a.envfile in the current working directory.
- SMART_LIB: Path to the S.M.A.R.T CLI library. Uses
udisksctlfor Linux andsmartctlfor macOS/Windows. - DISK_LIB: Path to disk util library. Uses
lsblkfor Linux,diskutilfor macOS, andpwshfor Windows. - METRICS: List of metrics to monitor. Default:
[] - GMAIL_USER: Gmail username to authenticate SMTP library.
- GMAIL_PASS: Gmail password to authenticate SMTP library.
- RECIPIENT: Email recipient for email notifications.
- PHONE: Phone number for SMS notifications.
- NTFY_URL: URL for Ntfy notifications.
- NTFY_TOPIC: Topic for Ntfy notifications.
- NTFY_USERNAME: Username for Ntfy notifications.
- NTFY_PASSWORD: Password for Ntfy notifications.
- TELEGRAM_BOT_TOKEN: Telegram bot token for Telegram notifications.
- TELEGRAM_CHAT_ID: Telegram chat ID for Telegram notifications.
- TELEGRAM_THREAD_ID: Telegram thread ID for Telegram notifications.
- DISK_REPORT: Boolean flag to send disk report via email.
- REPORT_DIR: Directory to save disk reports. Default:
report - REPORT_FILE: Filename for disk reports. Default format:
disk_report_%m-%d-%Y_%I:%M_%p.html
Release Notes
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
Linting
pre-commit will ensure linting
Requirement
python -m pip install pre-commit
Usage
pre-commit run --all-files
Pypi Package
https://pypi.org/project/PyUdisk/
License & copyright
© Vignesh Rao
Licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyudisk-2.0.2-py3-none-any.whl.
File metadata
- Download URL: pyudisk-2.0.2-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5d6c0ed54b1d2e042eeb4693cc1d9f7ec644870c2c1adf93508f9e08ba09317
|
|
| MD5 |
d300c4342931a2d865448311092cbad1
|
|
| BLAKE2b-256 |
786cb30760c3c3c9ab0bec0a7ce59bb429d211f8bf50dcf71ee0b83711510f51
|