]> 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>
Tue, 2 Nov 2021 02:34:15 +0000 (11:34 +0900)
commitc647ebc2b68f152d202dd8abedbe5161245aa795
treed2c35e4f4c8f3ea7bc634c84afa9362c50c6958c
parent4cfabab2a2cb8b1526cdfc247cd42d7acc5c41b6
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.c