Re: [RFC PATCH 0/2]lsirq,irqtop: Add filter support

Karel Zak <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <qdiia2fmgfxwgr75qjdgxuiitaoo66tsthajqxs6mrtca6oqh4@irpn3e44w4sw>
On Thu, Mar 06, 2025 at 06:51:59PM GMT, Joe Jin wrote:
> Sometimes people may only be interested in a specific IRQ, adding regular
> expression support can help engineers find/monitor IRQs easily.

Ah, the libsmartcols provides a filter. See, for example, misc-utils/lsblk.c and
the "-Q" command line option, and also "man scols-filter".

scols_new_filter()
scols_line_apply_filter()
scols_line_is_filled()
... etc.

https://www.kernel.org/pub/linux/utils/util-linux/v2.41/libsmartcols-docs/libsmartcols-Filters-and-counters.html

The filter allows the creation of complex queries, so if we integrate
it into lsirq and irqtop, it will be possible to use things like:

    irqtop -Q 'NAME ~= "PCI\-.*" && TOTAL > 100'


  Karel

-- 
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.