]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: introduce -p/--pid option, pids filter working in the early stage
authorMasatake YAMATO <yamato@redhat.com>
Fri, 22 Oct 2021 03:48:47 +0000 (12:48 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 28 Oct 2021 19:47:57 +0000 (04:47 +0900)
commit4cfabab2a2cb8b1526cdfc247cd42d7acc5c41b6
treececaa7969e92b5b1c6895fe3e2ff3f187dfda7c6
parentd112a40cb47e69e451dd9fefc1fe7c9747076546
lsfd: introduce -p/--pid option, pids filter working in the early stage

    $ time sudo ./lsfd -Q '(PID == 1) or (PID == 2)' > /dev/null

    real 0m0.508s
    user 0m0.230s
    sys 0m0.267s

    $ time sudo ./lsfd -p 1,2 > /dev/null

    real 0m0.088s
    user 0m0.036s
    sys 0m0.033s

    $ [ $(./lsfd -p 1,2) = $(./lsfd -Q '(PID == 1) or (PID == 2)') ]
    $ echo $?
    0

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd.1.adoc
misc-utils/lsfd.c
tests/expected/lsfd/option-pid [new file with mode: 0644]
tests/ts/lsfd/option-pid [new file with mode: 0755]