LSLOCKS(8) LSLOCKS(8) lslocks - lslocks [] lslocks Linux. -b, --bytes Print sizes in bytes rather than in human-readable form. By default, sizes are shown in units that are powers of 1024 bytes. The formal abbreviations for these units (KiB, MiB, GiB, ...) are further shortened to just their first letter: K, M, G, .... -H, --list-columns List the columns that can be specified with the --output option. Can be used with --json or --raw to get the list in a machine-readable format. -i, --noinaccessible , . -J, --json B JSON. -n, --noheadings . -o, --output , . --help, . , + (, lslocks -o +BLOCKER) --output-all . -p, --pid pid , pid. -Q, --filter Print only the locks that meet the conditions specified by the expr. This feature is EXPERIMENTAL. See also scols-filter(5). For example exclude POSIX type locks, but print all READ mode ones locks on files with .qcow2 as extension: lslocks --filter 'TYPE != "POSIX" and MODE == "READ" and PATH =~ ".*\.qcow2"' -r, --raw . -u, --notruncate . -h, --help . -V, --version . LIBSMARTCOLS_DEBUG=all libsmartcols. LIBSMARTCOLS_DEBUG_PADDING=on . COMMAND , . PID . TYPE ; LEASE ( fcntl(2)), FLOCK ( flock(2)), POSIX ( fcntl(2) lockf(3)) OFDLCK ( fcntl(2)). SIZE . INODE inode. MAJ:MIN , :. MODE (, ). , <<*>> (). M '; 0 <<>> ( , ), 1 <<>>. (. fcntl(2).) START . END . PATH . , <<...>> . ; --notruncate, . BLOCKER PID , . HOLDERS The holder(s) of the lock. The format of the holder is PID,COMMAND,FD. If a lock is an open file description-oriented lock, there can be more than one holder for the lock. See the NOTES below. LSLOCKS_COLUMNS= Specifies a comma-separated list of output columns to print. All columns listed by --list-columns can be used. lslocks lslk(8), Victor A. Abell 2001 . "The process holding the lock" for leases, FLOCK locks, and OFD locks is a fake-concept. They are associated with the open file description on which they are acquired. With fork(2) and/or cmsg(3), multiple processes can share an open file description. So the holder process of a lease (or a lock) is not uniquely determined. lslocks shows the one of the holder processes in COMMAND and PID columns. The default output is subject to change. So whenever possible, you should avoid using default output in your scripts. For OFD locks, the PID column may show -1. Such lines cannot be selected by the filter, because the current filter engine does not support negative numbers. Davidlohr Bueso Christian Goeschel Ndjomouo flock(1), fcntl(2), lockf(3), scols-filter(5) lslocks util-linux, Linux . util-linux 2.42.3 2026-09-02 LSLOCKS(8)