Zum Hauptinhalt springen
Intelligence View
⚡ tsecurity.de Intelligence

linux local system locks

The lslk(8) program has been unmaintained and deprecated for over a decade now, since 2001. I've recently rewritten the tool, now called lslocks(8) that allows…

Beitrag
0
Seite
0
↗ Quelle (blog.stgolabs.net)
Cloud & Tech-Stack · 2 Min. Lesezeit
Quelle: blog.stgolabs.net
Rubrik: Unix & Linux Server



The lslk(8) program has been unmaintained and deprecated for over a decade now, since 2001.  I've recently rewritten the tool, now called lslocks(8) that allows an easier and up-to-date way of seeing all the current file held locks in a Linux system. This program will be shipping soon with standard system tools and available in your favorite distribution.





Some important modifications include removing legacy Unix outputs and options, for example:





  • Don't output inode number, whence and maj:min device numbers.

  • Don't provide nonblocking syscall options stat(2) and readlink(2). 


    • The option to use nonblocking calls was previously intended for NFS partitions; however this should be transparent to utility programs considering that timeouts can occur generically in any context (fuse - sshfs, NFS, netdevs, etc).





The command itself is quite straightforward - KISS:





 $> lslocks   
COMMAND PID TYPE SIZE MODE M START END PATH
smbd 1379 POSIX 5B WRITE 0 0 0 /var/run/samba/smbd.pid
smbd 1379 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
...
smbd 1379 POSIX 696B READ 0 4 4 /var/run/samba/gencache_notrans.tdb
smbd 1513 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
(unknown) 1717 FLOCK 0B WRITE 0 0 0 /var/run
atd 1793 POSIX 5B WRITE 0 0 0 /var/run/atd.pid
sendmail-mta 2004 POSIX 52B WRITE 0 0 0 /var/run/sendmail/mta/sendmail.pid
nmbd 2292 POSIX 5B WRITE 0 0 0 /var/run/samba/nmbd.pid
nmbd 2292 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
nmbd 2292 POSIX 108K READ 0 4 4 /var/run/samba/connections.tdb
cat 3221 POSIX 0B WRITE 0 0 0 /home/dave/.local/share/zeitgeist/fts.index/flintlock
zeitgeist-daemo 3211 POSIX 989K WRITE 0 1073741824 1073742335 /home/dave/.local/share/zeitgeist/activity.sqlite
chromium-browse 4306 POSIX 202K WRITE 0 1073741824 1073742335 /home/dave/.config/chromium/Default/Web Data
...







We can quickly see the command name and PID that currently cause a lock to be held, as well as its size and canonical path. The lock itself, can be  FLOCK (created with flock(2)) or POSIX (created with fcntl(2) and lockf(2)) - I won't go over explaining the differences as it's not in the context of this post. The start and end are the relative byte offset of the lock.







Enjoy!

Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Community discussion & comments

🌐 Join the main chat

Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.

Security Briefing Free · 1-Click Unsubscribe

Intelligence Digest — free

The top security news daily · unsubscribe anytime

Community Rating & Social Proof
⭐ Reader Rating
–
Ø / 5.0
No reader ratings yet
Was this article helpful?
0
Submit your rating
Detailed rating (optional)
Content & Quality
Source & Credibility
Freshness

Related story clusters & sources (vector AI)

6 Cluster
26 sources
Black Friday Oura Ring deals: The best of the deals so far, picked by a wearable-tech expert
Latest from TechRadar 33 min. ago
25 more sources
CNET6 years agoOur Favorite Blenders of 2026 Are on Sale Ahead of Black Friday CNET37 min. agoBrighten Up Your Day by Saving 20% Off Flashlights With Olight’s Black Friday Sale CNET29 min. agoLive: Black Friday Deals Are Here. Shop Expert Picks Across Tech, Everyday Essentials and More at Up to 60% Off Golem.de43 min. agoAnzeige: Logitech-Tastatur MX Keys S am Black Friday zum Sensationspreis auf Amazon PC-WELT55 min. agoLuminar zum Black Friday: KI-Bildbearbeitung für nur 79,20 Euro Latest from TechRadar1 hour agoThis is the pair of open earbuds to hunt down over Black Friday Latest from TechRadar1 hour agoBest AirPods Black Friday deals: all live savings on AirPods Pro 3 and more Computer Bild1 hour agoPhilips Sonicare DiamondClean 9000 zum Black Friday günstiger netzwelt.de2 hours agoESR startet mit Black-Friday-Rabatten: Diese AirPods-Hüllen lohnen sich jetzt netzwelt.de2 hours agoPlayStation 5 geschenkt: Diese Black-Friday-Aktion legt die Konsole gratis obendrauf netzwelt.de2 hours ago6 Dyson-Staubsauger im Vergleich: Dieser Sauger wird am Black Friday überraschend zum Preis/Leistungssieger netzwelt.de1 hour agoMonitore im Angebot zum Black Friday: Gutes Bild für Office, Gaming und mehr Golem.de1 hour agoAnzeige: Akkuschrauber mit 20 Bits zum Black Friday erstmals unter 50 Euro bei Amazon PC-WELT1 hour agoDie günstigsten Handytarife an Black Friday von 10 GB bis Unlimited: Hier lohnt sich ein Wechsel PC-WELT1 hour agoBlack Friday 2026 bei LiberNovo: Ergonomische Bürostühle mit bis zu 44 Prozent Rabatt Latest from TechRadar1 hour agoThe best Black Friday robot vacuum deals: Dreame, Shark, Dyson, and Roborock Golem.de1 hour agoAnzeige: Topdon-Starthilfe-Powerbank für Kfz zum Black-Friday-Bestpreis nur rund 85 Euro heise online News2 hours agoBlack Friday: Die besten Kopfhörer zum Tiefstpreis – Sonos Ace, Nothing & Shokz Latest from Windows Central2 hours agoDell's Black Friday deals drop major savings on Alienware OLED monitors CNET2 years agoMake Every Night Game Night and Save $90 on the Nex Playground With This Black Friday Deal DEV Community1 hour agoThe app is part of the gadget: 14,000 App Store reviews of 28 device apps before Black Friday Latest from TechRadar2 hours agoBlack Friday tech deals under $100 / £100: Fire TV Sticks, earbuds, coffee machines and more Caschys Blog3 hours agoGoogle One: Black-Friday-Angebot mit bis zu 50 Prozent Rabatt netzwelt.de3 hours agoDem Testsieger ebenbürtig: Zum Black Friday stürzt Xiaomis stärkster E-Scooter im Preis ab Macerkopf.de3 hours agoFotos verbessern mit Aiarty: 52 % Rabatt + Gratisgeschenke zum Black Friday
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten linux local system locks

Thematisch verwandte Begriffe: linux, local, system, locks · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Widgets & Topics
Loading widgets…
Nächster Beitrag