Skip to main content

pysoundofinterrupts

PyPI version License: MIT

Sonify and visualize Linux kernel interrupts by reading /proc/interrupts: listen to the system like a stethoscope or plot its activity in real time.

  • Course: Used in the Operating Systems course (Sistemas Operativos) at FaMAF-UNC (Facultad de Matemática, Astronomía, Física y Computación, Universidad Nacional de Córdoba).
  • Credits: Based on ideas by Nicolás Wolovick: each interrupt drives the speaker in 1-bit PCM fashion (ZX-Spectrum style). If there are about 100 interrupts per second, you hear something like a 100 Hz tone.

Linux only - the program reads /proc/interrupts. On other systems it exits with a clear message.

Links: PyPI · Repository


Installation

Requirements: Python 3.10+, Linux.

With pipx (recommended)

Install and run in an isolated environment without touching your global Python.

PyPI (last published release):

pipx install pysoundofinterrupts

This repository is 0.2.0 (src package layout). Until that version is on PyPI, install from a clone or GitHub:

pipx install .
# or: pipx install git+https://github.com/pablogventura/pysoundofinterrupts.git

For development against this tree (changes apply without reinstall):

pipx install -e .

This makes the interrupts-sound (audio) and interrupts-plot (graph) commands available.

With pip

pip install pysoundofinterrupts

Same note as pipx: use a clone (pip install .) if you need 0.2.0 before it is on PyPI.


Usage

Command Description
interrupts-sound Listen to kernel interrupts in real time (audio).
interrupts-plot Real-time plot by type (LOC, RES, CAL, TLB).

Real-time sound

interrupts-sound

Press Enter to exit. To calibrate the level:

Option Environment variable Description
--subtractor INTERRUPTS_SUBTRACTOR Subtract a floor from rate (default 1000)
--divider INTERRUPTS_DIVIDER Divide the rate (default 25)
--amplitude INTERRUPTS_AMPLITUDE Volume 0-1 (default 0.2)

Example:

interrupts-sound --subtractor 800 --divider 20

Real-time plot

interrupts-plot

Shows interrupts by type (LOC, RES, CAL, TLB). Options:

Option Environment variable Description
--x-max INTERRUPTS_PLOT_X_MAX Points on X axis (default 100)
--y-max INTERRUPTS_PLOT_Y_MAX Y axis upper limit (default 5000)
--interval INTERRUPTS_PLOT_INTERVAL Update interval in ms (default 50)

Development and tests

Clone the repo, create a virtualenv, and install in editable mode with test extras:

git clone https://github.com/pablogventura/pysoundofinterrupts.git
cd pysoundofinterrupts
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"
pytest tests/ -v

The suite uses mock /proc/interrupts files and does not open audio devices or a GUI. Unit tests do not require a live /proc/interrupts.


Publishing to PyPI

From the project directory, with build and twine installed:

pip install build twine
./scripts/publish_to_pypi.sh

The first time, configure your PyPI credentials (token in ~/.pypirc or TWINE_USERNAME and TWINE_PASSWORD). See Twine: Configuration.


Troubleshooting

  • No audio: Check your default output device. The program uses the system default or the first available output device.
  • Linux only: On Windows or macOS the program exits stating it requires Linux.
  • Permissions: Reading /proc/interrupts usually does not require root. If it fails, check that the file exists: ls /proc/interrupts.

License

MIT. See LICENSE in the repository.

Metadata

Release files for pysoundofinterrupts 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysoundofinterrupts 0.2.0
File Size Uploaded
pysoundofinterrupts-0.2.0.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysoundofinterrupts 0.2.0
File Interpreter ABI Platform
pysoundofinterrupts-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.2 kB

Release files / pysoundofinterrupts-0.2.0.tar.gz

Download URL pysoundofinterrupts-0.2.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
23912ca812e407716f90ad0053c9fd2076c5250b8cf82f8804baafcab2660d83
BLAKE2b-256 checksum
How to use checksums
c8a5724f84d477df2a71b4a2587bc73b4d2fdfc983cee46261f8569b3d6b651e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pysoundofinterrupts-0.2.0-py3-none-any.whl

Download URL pysoundofinterrupts-0.2.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d108cd425acb58b7346f46efd5d0d471fb8c9d27e9d470748e3170e803381cd3
BLAKE2b-256 checksum
How to use checksums
2c74073f64a643d7853f93febb02db29631b228053c74c8c9298ce8a6d483285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page