proxy.golang.org : github.com/thediveo/irks
Package irks provides information about interrupt counts per IRQ and CPU on Linux, as well as additional IRQ information about assigned actions and CPU affinities. It returns information only about “hardware” IRQs, that is, IRQs with an IRQ number, as opposed to interrupts with alphanumeric identifiers. Throughout the irks module we use the term “CPU” as used by the Linux kernel, its ABI, and associated CLI tools, such as lscpu(1). Here, a “CPU” (without any appendix such as “core”) has a logical CPU number assigned and executes code (at least seemingly) independently from other CPUs. In contrast, a “core” in Linux kernel speak is an aggregation level where a core can contain several CPUs. In the end, “core” is a concept of physical topology. But in irks, all we care about are CPUs, not their physical topologies. They can form towers of Hammurabi or Hanoi, if they so please, but we don't care. Thus, no “cores” or whatsoever. Unfortunately, the man page for proc_interrupts(5) has not much to say, except “Very easy to read formatting, done in ASCII.” This “explanation” is almost comical in a true Hitchhiker's Guide style. Digging into the Linux kernel sources luckily brings up show_interrupts that then spills the beans about the format of the “/proc/interrupts” pseudo file. First comes the header line... Then come the individual IRQ lines... Information about individual IRQs is also available in a second place, but compared to “/proc/interrupts” now broken up into many individual data tidbits instead of a single pseudo file. The first level is per IRQ number, hence the metasyntactic “#” in “/sys/kernel/irq/#/”. For each IRQ there is a set of individual pseudo files, please see also the kernel ABI testing documentation on /sys/kernel/irq: The downside of “/sys/kernel/irq/#/” is that gathering all information requires a lot of repeated open, read, and close VFS operations. In contrast, getting the IRQ counters per CPU requires considerably fewer VFS operations when using “/proc/interrupts”: one open, one close, and in-between just reading, reading, reading. From a performance perspective, “/sys/kernel/irq/#/” should be used in order to get certain structural IRQ information, such as the actions. Oh, there's a third place that also provides further IRQ information. Its main function is to show and control the IRQ-to-CPU(s) affinities.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/thediveo/irks
License: Apache-2.0
Latest release: 3 months ago
First release: 5 months ago
Namespace: github.com/thediveo
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago