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.

Download files

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

Source Distribution

pysoundofinterrupts-0.2.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

pysoundofinterrupts-0.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pysoundofinterrupts-0.2.0.tar.gz.

File metadata

  • Download URL: pysoundofinterrupts-0.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pysoundofinterrupts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 23912ca812e407716f90ad0053c9fd2076c5250b8cf82f8804baafcab2660d83
MD5 88a4cabb014f29e2e8047a9381859725
BLAKE2b-256 c8a5724f84d477df2a71b4a2587bc73b4d2fdfc983cee46261f8569b3d6b651e

See more details on using hashes here.

File details

Details for the file pysoundofinterrupts-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pysoundofinterrupts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d108cd425acb58b7346f46efd5d0d471fb8c9d27e9d470748e3170e803381cd3
MD5 812083a64f54ee6fd17f750dc4cc95bc
BLAKE2b-256 2c74073f64a643d7853f93febb02db29631b228053c74c8c9298ce8a6d483285

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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