Sonifica y visualiza interrupciones del kernel Linux leyendo /proc/interrupts
Project description
pysoundofinterrupts
Sonifica y visualiza las interrupciones del kernel Linux leyendo /proc/interrupts: escucha el sistema como un estetoscopio o dibuja su actividad en tiempo real.
Basado en la idea de Nicolás Wolovick: cada interrupción impulsa el altavoz en modo 1-bit PCM (estilo ZX-Spectrum). Si hay unas 100 interrupciones por segundo, oirás algo parecido a un tono de 100 Hz.
Solo Linux — el programa lee /proc/interrupts. En otros sistemas termina con un mensaje claro.
Instalación
Con pipx (recomendado)
Instala y ejecuta en un entorno aislado, sin tocar tu Python global:
pipx install pysoundofinterrupts
Quedan disponibles los comandos interrupts-sound (sonido) e interrupts-plot (gráfico).
Para instalar desde el código fuente (por ejemplo, en desarrollo):
pipx install .
Con pip
pip install pysoundofinterrupts
Requisitos: Python 3.8+, Linux.
Uso
| Comando | Descripción |
|---|---|
interrupts-sound |
Escucha las interrupciones del kernel en tiempo real (audio). |
interrupts-plot |
Gráfico en tiempo real por tipo (LOC, RES, CAL, TLB). |
Sonido en tiempo real
interrupts-sound
Pulsa Enter para salir. Para calibrar el nivel:
| Opción | Variable de entorno | Descripción |
|---|---|---|
--subtractor |
INTERRUPTS_SUBTRACTOR |
Resta un piso a la tasa (default 1000) |
--divider |
INTERRUPTS_DIVIDER |
Divide la tasa (default 25) |
--amplitude |
INTERRUPTS_AMPLITUDE |
Volumen 0–1 (default 0.2) |
Ejemplo:
interrupts-sound --subtractor 800 --divider 20
Gráfico en tiempo real
interrupts-plot
Muestra interrupciones por tipo (LOC, RES, CAL, TLB). Opciones:
| Opción | Variable de entorno | Descripción |
|---|---|---|
--x-max |
INTERRUPTS_PLOT_X_MAX |
Puntos en el eje X (default 100) |
--y-max |
INTERRUPTS_PLOT_Y_MAX |
Límite del eje Y (default 5000) |
--interval |
INTERRUPTS_PLOT_INTERVAL |
Actualización en ms (default 50) |
Desarrollo y tests
Clonar el repo, crear un entorno y instalar en modo editable con extras de test:
git clone https://github.com/TU_USUARIO/pysoundofinterrupts.git
cd pysoundofinterrupts
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[test]"
pytest tests/ -v
Publicar en PyPI
Desde el directorio del proyecto, con build y twine instalados:
pip install build twine
./scripts/publish_to_pypi.sh
La primera vez configura las credenciales de PyPI (token en ~/.pypirc o variables TWINE_USERNAME y TWINE_PASSWORD). Ver Twine: Configuration.
Problemas frecuentes
- Sin audio: Comprueba el dispositivo de salida por defecto. El programa usa el dispositivo por defecto del sistema o el primer dispositivo de salida disponible.
- Solo en Linux: En Windows o macOS el programa termina indicando que necesita Linux.
- Permisos: Leer
/proc/interruptsno suele requerir root. Si falla, comprueba que exista:ls /proc/interrupts.
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 Distribution
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 pysoundofinterrupts-0.1.0.tar.gz.
File metadata
- Download URL: pysoundofinterrupts-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbc5eb1e14de6d5180620d118805e42d0afcd97b188f26fac8510bce77b22c12
|
|
| MD5 |
cfe62af2fd56bf9e61fb2603d17bb414
|
|
| BLAKE2b-256 |
c09e8473935af4aeb7f794fdd2fdf18c52afe109378bbb4dc0be9047a8b9e95b
|
File details
Details for the file pysoundofinterrupts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pysoundofinterrupts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7535db78490229df7293bc89de7cbc2c844fcc0d24da67bb2d94cdb44586aa3a
|
|
| MD5 |
b28cb2e18d73600249e8cb81139d24fd
|
|
| BLAKE2b-256 |
4da40737c6f076264572659acad0db11f62448951b0dc8988866e71a87ffbccc
|